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

Re: [Xen-devel] [PATCH 6/7] mini-os: Added rmb to xenbus code



On Fri, 2014-06-06 at 05:59 +0100, karim.allah.ahmed@xxxxxxxxx wrote:
> In any case, by looking at the patch it seems like rmb was required to
> make sure that the reply message is visible to the current processor
> when this thread wakes up and starts reading it.

Can we assume (or arrange) that schedule() gives us this guarantee? Do
we want to?

I don't think the current schedule() common code guarantees this, and
obviously the x86 arch code doesn't care. Someone should decide...

> 
> I'll have a look at the other patches and put some comments there as well.
> 
> Regards.
> 
> On Thu, Jun 5, 2014 at 6:45 PM, Thomas Leonard <talex5@xxxxxxxxx> wrote:
> > Hi Karim,
> >
> > Do you remember what this rmb call is for? It's from your commit here:
> >
> > https://github.com/KarimAllah/xen/commit/61e8edeb9eabdf575f6f8e7720d977f07d907579#diff-dd67cee31c935093d2c65298a1d5b267R455
> >
> > https://github.com/KarimAllah/xen/blob/61e8edeb9eabdf575f6f8e7720d977f07d907579/extras/mini-os/xenbus/xenbus.c#L455
> >
> > Also, if you have any information to add to the other commits, that
> > would be very useful:
> >
> > https://github.com/talex5/xen/commits/sent-Jun-04
> >
> >
> >
> > On 5 June 2014 14:55, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> >> Hi Thomas,
> >>
> >> Thank you for the patch.
> >>
> >> On 06/04/2014 05:06 PM, Thomas Leonard wrote:
> >>> From: Karim Raslan <karim.allah.ahmed@xxxxxxxxx>
> >>>
> >>> Signed-off-by: Karim Allah Ahmed <karim.allah.ahmed@xxxxxxxxx>
> >>> [talex5@xxxxxxxxx: separated from big ARM commit]
> >>> Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>
> >>> ---
> >>>  extras/mini-os/xenbus/xenbus.c | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/extras/mini-os/xenbus/xenbus.c 
> >>> b/extras/mini-os/xenbus/xenbus.c
> >>> index d995020..8a99ee2 100644
> >>> --- a/extras/mini-os/xenbus/xenbus.c
> >>> +++ b/extras/mini-os/xenbus/xenbus.c
> >>> @@ -450,6 +450,7 @@ xenbus_msg_reply(int type,
> >>>      remove_waiter(w, req_info[id].waitq);
> >>>      wake(current);
> >>>
> >>> +    rmb();
> >>
> >> Could you explain in the commit message why this rmb is necessary?
> >>
> >> Regards,
> >>
> >> --
> >> Julien Grall
> >
> >
> >
> > --
> > Dr Thomas Leonard        http://0install.net/
> > GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
> > GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
> 
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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