[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 7/8] oxenstored: only process domain connections that notify us by events

On 16/09/2014 10:19, Dave Scott wrote:

On 15 Sep 2014, at 23:39, Zheng Li <dev@xxxxxxxx> wrote:
-let process_domains store cons domains =
-       let do_io_domain domain =
-               if not (Domain.is_bad_domain domain) then
-                       let con = Connections.find_domain cons (Domain.get_id 
domain) in
-                               Process.do_input store cons domains con;
-                               Process.do_output store cons domains con in
-       Domains.iter domains do_io_domain
+let process_domain ?mode_switch store cons domains c =

Whatâs mode_switch for?

Hmm, I should put some comment doc there :-(  Will do in v2.

It's an optional boolean parameter. If true,  only process the input; if false, 
only process the output; if not preference, process both (like before).

With this added, we can selectively process only the input or output (as we can 
deduce the type of left work as shown in patch 8/8). Previously, for each 
domain connection we tried to process on both directions disregarding what kind 
of work was left.

@@ -305,6 +309,7 @@ let _ =
                        Connections.add_anonymous cons cfd can_write
                and handle_eventchn fd =
                        let port = Event.pending eventchn in
+                       debug "pending port %d" (Xeneventchn.to_int port);

Accidentally left some debugging in? It looks like it could be quite spammy.

Well, this is actually intentional. It won't be spammy because debug level 
logging is disabled by default (as you can see there are already quite a few of 
them spread in the code). The information here is rather useful when doing 
debugging at this level.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.