From: Keir Fraser Subject: Re: Linux questions Date: Tue, 04 Dec 2007 10:55:15 +0000 Message-ID: References: <475538A4.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <475538A4.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 4/12/07 10:23, "Jan Beulich" wrote: > 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. We're sync'ing against concurrent updates of a this_cpu variable. We can only race updates in a local ISR, and hence barrier() suffices. > 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-temporal > memory accesses) - isn't that exactly what you just recently did in the > hypervisor? It is, in response to Intel's new whitepaper on memory ordering guarantees, and also after seeing similar patches committed in Linux (despite some protestation!). Within Linux guests, we will simply follow the barrier definitions for the tree we are patching. Virtualisation should not affect barrier implementations. -- Keir