From: Wei Liu Subject: Re: [Minios-devel] [PATCH MINI-OS v2] xenbus: notify the other end when necessary Date: Mon, 26 Oct 2015 16:52:25 +0000 Message-ID: <20151026165225.GF19925@zion.uk.xensource.com> References: <1445863676-14874-1-git-send-email-wei.liu2@citrix.com> <20151026125247.GP19459@var.bordeaux.inria.fr> <20151026135531.GG13118@zion.uk.xensource.com> <20151026163001.GF18602@var.bordeaux.inria.fr> <22062.21898.162478.153744@mariner.uk.xensource.com> <20151026163751.GH18602@var.bordeaux.inria.fr> <20151026164115.GE19925@zion.uk.xensource.com> <20151026164353.GI18602@var.bordeaux.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20151026164353.GI18602@var.bordeaux.inria.fr> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Thibault , Wei Liu , Ian Jackson , minios-devel@lists.xenproject.org, Xen-devel , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Mon, Oct 26, 2015 at 05:43:53PM +0100, Samuel Thibault wrote: > Also, just to make sure: you tested with the third and fourth hooks of > your v2 patch applied, only first and second hooks were removed? > > Samuel See the patch below. >From 0643a821ce2795e7e65e199e7caaa657f27bafcf Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 23 Oct 2015 20:01:06 +0100 Subject: [PATCH] Test patch --- xenbus/xenbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xenbus/xenbus.c b/xenbus/xenbus.c index 4613ed6..0ab387a 100644 --- a/xenbus/xenbus.c +++ b/xenbus/xenbus.c @@ -237,6 +237,7 @@ static void xenbus_thread_func(void *ign) event->path = data; event->token = event->path + strlen(event->path) + 1; + mb(); xenstore_buf->rsp_cons += msg.len + sizeof(msg); for (watch = watches; watch; watch = watch->next) @@ -262,9 +263,13 @@ static void xenbus_thread_func(void *ign) req_info[msg.req_id].reply, MASK_XENSTORE_IDX(xenstore_buf->rsp_cons), msg.len + sizeof(msg)); + mb(); xenstore_buf->rsp_cons += msg.len + sizeof(msg); wake_up(&req_info[msg.req_id].waitq); } + + wmb(); + notify_remote_via_evtchn(start_info.store_evtchn); } } } -- 2.1.4