From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH 6/7] mini-os: Added rmb to xenbus code Date: Fri, 6 Jun 2014 17:10:46 +0200 Message-ID: <20140606151046.GI1397@type.bordeaux.inria.fr> References: <538D9161.6090402@linaro.org> <1401897998-29569-1-git-send-email-talex5@gmail.com> <1401897998-29569-7-git-send-email-talex5@gmail.com> <539076E9.4020007@linaro.org> <1402064142.1313.62.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wsvn7-0000a5-96 for xen-devel@lists.xenproject.org; Fri, 06 Jun 2014 15:10:49 +0000 Content-Disposition: inline In-Reply-To: <1402064142.1313.62.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Thomas Leonard , Julien Grall , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Ian Campbell, le Fri 06 Jun 2014 15:15:42 +0100, a =E9crit : > 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'd tend to think something like that, yes. More precisely, thread wait/wake primitives usually provide a barrier: events before the wake are supposed to complete before the wait returns. So both should have a memory barrier. Samuel