[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH MINI-OS v2] xenbus: notify the other end when necessary
On Mon, Oct 26, 2015 at 06:11:04PM +0100, Samuel Thibault wrote: > Wei Liu, le Mon 26 Oct 2015 16:41:15 +0000, a écrit : > > The oxenstored in staging. > > Ok. For a first, one fishy thing at quick sight is that the only > occurence of rsp_cons (except at closure) is when writing, and not when > going to sleep. One issue there is that ml_interface_write only writes > a contiguous piece of data, so when crossing the ring bound, it will > return a short write while there *is* room! > > One quick test you could do is calling Xs_ring.write a second time in > tools/ocaml/libs/xb/xb.ml's write_mmap, something like below (untested, > and my caml is old, so it's ugly, but you get the idea). > > Samuel > > diff --git a/tools/ocaml/libs/xb/xb.ml b/tools/ocaml/libs/xb/xb.ml > index 50944b5..33298d2 100644 > --- a/tools/ocaml/libs/xb/xb.ml > +++ b/tools/ocaml/libs/xb/xb.ml > @@ -91,10 +91,12 @@ let write_fd back con s len = > Unix.write back.fd s 0 len > > let write_mmap back con s len = > - let ws = Xs_ring.write back.mmap s len in > - if ws > 0 then > + let ws = ref (Xs_ring.write back.mmap s len) in > + if !ws < len then > + ws := !ws + Xs_ring.write back.mmap (String.sub s !ws > (len-!ws)) (len-!ws); > + if !ws > 0 then > back.eventchn_notify (); > - ws > + !ws > > let write con s len = > match con.backend with I'm now running a slightly modified version of this diff (to fix compilation) and a mini-os only notifies the other end when it consumes message. The result is looking good, but I will let it run overnight to be sure. If the backend is to blame, I think we need to accept the fact it is now the de facto behaviour of xenstore ring and work around it in the frontend... Wei. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |