All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: "karim.allah.ahmed@gmail.com" <karim.allah.ahmed@gmail.com>
Cc: xen-devel@lists.xenproject.org, Thomas Leonard <talex5@gmail.com>,
	Julien Grall <julien.grall@linaro.org>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [PATCH 6/7] mini-os: Added rmb to xenbus code
Date: Fri, 6 Jun 2014 15:15:42 +0100	[thread overview]
Message-ID: <1402064142.1313.62.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <CAOTdubu-AQmqFdn5L3hh9q1RkrDvoJdxwtWW_T5QB9T-CVDBkg@mail.gmail.com>

On Fri, 2014-06-06 at 05:59 +0100, karim.allah.ahmed@gmail.com 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@gmail.com> 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@linaro.org> wrote:
> >> Hi Thomas,
> >>
> >> Thank you for the patch.
> >>
> >> On 06/04/2014 05:06 PM, Thomas Leonard wrote:
> >>> From: Karim Raslan <karim.allah.ahmed@gmail.com>
> >>>
> >>> Signed-off-by: Karim Allah Ahmed <karim.allah.ahmed@gmail.com>
> >>> [talex5@gmail.com: separated from big ARM commit]
> >>> Signed-off-by: Thomas Leonard <talex5@gmail.com>
> >>> ---
> >>>  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
> 
> 
> 

  reply	other threads:[~2014-06-06 14:15 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 17:49 [PATCH 0/4] mini-os: initial ARM support Thomas Leonard
2014-06-02 17:49 ` [PATCH 1/4] mini-os: Fixed shutdown thread Thomas Leonard
2014-06-03  0:51   ` Samuel Thibault
2014-06-03  9:01   ` Andrew Cooper
2014-06-02 17:49 ` [PATCH 2/4] mini-os: Tidied up code Thomas Leonard
2014-06-03  0:57   ` Samuel Thibault
2014-06-02 17:49 ` [PATCH 3/4] mini-os: Initial commit to port minios to ARM Thomas Leonard
2014-06-03  9:12   ` Julien Grall
2014-06-04 16:06     ` [PATCH 0/7] mini-os: Preparing for ARM support Thomas Leonard
2014-06-04 16:06       ` [PATCH 1/7] mini-os: Fixed shutdown thread Thomas Leonard
2014-06-04 16:06       ` [PATCH 2/7] mini-os: Tidied up code Thomas Leonard
2014-06-04 16:22         ` Andrew Cooper
2014-06-05 10:24           ` Anil Madhavapeddy
2014-06-04 16:06       ` [PATCH 3/7] mini-os: Moved events code under arch Thomas Leonard
2014-06-04 16:23         ` Julien Grall
2014-06-06 13:54           ` Ian Campbell
2014-06-06 13:57         ` Ian Campbell
2014-06-04 16:06       ` [PATCH 4/7] mini-os: Switched initial C entry point to arch_init Thomas Leonard
2014-06-06 14:05         ` Ian Campbell
2014-06-04 16:06       ` [PATCH 5/7] mini-os: Moved arch-specific xenbus code under arch Thomas Leonard
2014-06-05 14:00         ` Julien Grall
2014-06-06 14:07         ` Ian Campbell
2014-06-04 16:06       ` [PATCH 6/7] mini-os: Added rmb to xenbus code Thomas Leonard
2014-06-05 13:55         ` Julien Grall
2014-06-05 17:45           ` Thomas Leonard
2014-06-06  4:59             ` karim.allah.ahmed
2014-06-06 14:15               ` Ian Campbell [this message]
2014-06-06 15:10                 ` Samuel Thibault
2014-06-06 16:40                   ` Ian Campbell
2014-06-09 13:56                     ` Thomas Leonard
2014-06-09 14:04                       ` Thomas Leonard
2014-06-04 16:06       ` [PATCH 7/7] mini-os: Moved force_evtchn_callback to header Thomas Leonard
2014-06-06 14:17         ` Ian Campbell
2014-06-09 11:54           ` Thomas Leonard
2014-06-04 16:12       ` [PATCH 0/7] mini-os: Preparing for ARM support Andrew Cooper
2014-06-02 17:49 ` [PATCH 4/4] mini-os: Added FDT support on ARM Thomas Leonard
2014-06-06 13:51   ` Ian Campbell
2014-06-05 14:36 ` [PATCH 0/4] mini-os: initial ARM support Oleksandr Tyshchenko
2014-06-05 14:57   ` Samuel Thibault
2014-06-05 17:20     ` Oleksandr Tyshchenko
2014-06-05 17:31   ` Thomas Leonard
2014-06-05 18:07     ` Oleksandr Tyshchenko
2014-06-05 18:12       ` Thomas Leonard
2014-06-05 18:21         ` Oleksandr Tyshchenko

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=1402064142.1313.62.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=karim.allah.ahmed@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=talex5@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.