From: Ian Campbell <ian.campbell@citrix.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Wei Liu <wei.liu2@citrix.com>
Cc: minios-devel@lists.xenproject.org,
Xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH MINI-OS v3 2/2] xenbus: workaround oxenstored short-write
Date: Mon, 16 Nov 2015 11:30:14 +0000 [thread overview]
Message-ID: <1447673414.27871.19.camel@citrix.com> (raw)
In-Reply-To: <20151027154740.GF2483@var.bordeaux.inria.fr>
On Tue, 2015-10-27 at 16:47 +0100, Samuel Thibault wrote:
> Wei Liu, le Tue 27 Oct 2015 15:43:29 +0000, a écrit :
> > Oxenstored has a behaviour that it only writes a contiguous piece of
> > data. When it writes across ring boundary it will return a short-write
> > while there is still room. That leads to mini-os stalling when it sees
> > there is not enough data in the ring.
> >
> > Given that oxenstored is the default xenstored implementation we think
> > it would be useful to workaround this for the benefit of running mini-
> > os
> > (and unikernel based on it) on any Xen installation.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> As discussed in the previous thread, this is rather a workaround.
Given that I'm in the process of applying "tools/ocaml/xb: Correct
calculations of data/space the ring" which I think is the real fix here am
unsure if we still want to take this workaround.
Any thoughts?
> Better
> be safe than sorry.
>
> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> And could too be backported to stable branches.
>
> > ---
> > xenbus/xenbus.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/xenbus/xenbus.c b/xenbus/xenbus.c
> > index 0ab387a..abf8b1b 100644
> > --- a/xenbus/xenbus.c
> > +++ b/xenbus/xenbus.c
> > @@ -205,8 +205,11 @@ static void xenbus_thread_func(void *ign)
> > prod = xenstore_buf->rsp_prod;
> > DEBUG("Rsp_cons %d, rsp_prod %d.\n", xenstore_buf-
> > >rsp_cons,
> > xenstore_buf->rsp_prod);
> > - if (xenstore_buf->rsp_prod - xenstore_buf->rsp_cons <
> > sizeof(msg))
> > + if (xenstore_buf->rsp_prod - xenstore_buf->rsp_cons <
> > sizeof(msg)) {
> > + /* Work around oxenstored bug */
> > + notify_remote_via_evtchn(start_info.store_evtchn);
> > break;
> > + }
> > rmb();
> > memcpy_from_ring(xenstore_buf->rsp,
> > &msg,
> > @@ -217,8 +220,11 @@ static void xenbus_thread_func(void *ign)
> > xenstore_buf->rsp_prod - xenstore_buf->rsp_cons,
> > msg.req_id);
> > if (xenstore_buf->rsp_prod - xenstore_buf->rsp_cons <
> > - sizeof(msg) + msg.len)
> > + sizeof(msg) + msg.len) {
> > + /* Work around oxenstored bug */
> > + notify_remote_via_evtchn(start_info.store_evtchn);
> > break;
> > + }
> >
> > DEBUG("Message is good.\n");
> >
> > --
> > 2.1.4
> >
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-16 11:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 15:43 [PATCH MINI-OS v3 0/2] Two mini-os xenbus patches Wei Liu
2015-10-27 15:43 ` [PATCH MINI-OS v3 1/2] xenbus: notify the other end when necessary Wei Liu
2015-10-27 15:46 ` Samuel Thibault
2015-10-27 15:55 ` Wei Liu
2015-11-16 12:10 ` Ian Campbell
2015-10-27 15:43 ` [PATCH MINI-OS v3 2/2] xenbus: workaround oxenstored short-write Wei Liu
2015-10-27 15:47 ` Samuel Thibault
2015-11-16 11:30 ` Ian Campbell [this message]
2015-11-16 11:47 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447673414.27871.19.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=minios-devel@lists.xenproject.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).