From: "Jan Beulich" Subject: Re: Linux questions Date: Tue, 04 Dec 2007 10:23:16 +0000 Message-ID: <475538A4.76E4.0078.0@novell.com> References: <4753F93C.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 03.12.07 19:32 >>> >On 3/12/07 11:40, "Jan Beulich" wrote: > >>> rmb() is more powerful than barrier(), not the converse. >>=20 >> Oh, sorry, I mixed barrier() with mb(). So the proposal would then = simply >> be the other way around (the use of locked operations or fence = instructions >> on x86 is really unnecessary as long as WC memory or non-temporal = stores >> don't need to be taken into consideration). > >Then the implementation of rmb() should be equivalent to barrier(). The = code >in time-xen.c is implemented to the interface definitions of barrier() = and >rmb() -- the former is used just where instruction ordering is important; >the latter where dynamic execution order matters too. I have to disagree: At least the uses of barrier() in monotonic_clock() = appear to be in places where in reality (and from a theoretical standpoint) rmb() ought to be used. But I agree that rmb() (and also wmb()) on x86 doesn't need to be more than barrier() (except, as said, in the context of WC memory or non-tempora= l=20 memory accesses) - isn't that exactly what you just recently did in the hypervisor? Jan