[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C257655B.66F1%Keir.Fraser@cl.cam.ac.uk>
Date: Fri, 27 Apr 2007 08:31:23 +0100
From: Keir Fraser <Keir.Fraser@...cam.ac.uk>
To: Jeremy Fitzhardinge <jeremy@...p.org>, Andi Kleen <ak@...e.de>
CC: Ian Pratt <ian.pratt@...source.com>,
lkml <linux-kernel@...r.kernel.org>,
Adrian Bunk <bunk@...sta.de>, <virtualization@...ts.osdl.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 06/25] xen: Core Xen implementation
On 27/4/07 08:08, "Jeremy Fitzhardinge" <jeremy@...p.org> wrote:
>> Don't you need a rmb() here then? The CPU could speculate reads
>> (more occurrences)
>>
>
> Is rmb() sufficient? It will stop a speculative read on the pending
> flag, but will it make sure the write has happened by then? Ie, is it a
> write-vs-read barrier, or just a read-vs-read?
> Documentation/memory-barriers.txt suggests not.
The barrier() is sufficient. We are racing against Xen checking
evtchn_upcall_mask *on the local cpu*. Which means an interrupt has to
occur, which squashes speculative stuff.
Yeah, I know, it needs a better comment. :-)
-- Keir
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists