[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Why does membar_consumer() do anything on x86_64?
On Thu, Jul 22, 2010 at 08:07:36PM +0200, Manuel Bouyer wrote:
> It's a x86_lfence(), which on i386 is implemted with a lock prefix.
> On amd64 it's a lfence instruction.
> This was in the xen2 code, which got removed in HEAD.
> For xen3, this is abstracted in arch/xen/include/xen3-public/io/ring.h,
> which uses x86_mfence, x86_lfence and x86_sfence.
> I'm almost sure that noone of these are a noop on linux.
I should have checked first ... for xen 3.1.x, these actually do
something, for xen 3.3.x, wmb and rmb got swicthed to noop. Only mb()
does something these days ...
On linux-22.214.171.124 these may or may not be noop, depending on the kernel
config options. That's why I think they still do something usefull for
some CPUs. While the kernel could make them noop at run time by patch,
I don't think it can be done for userland.
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
Main Index |
Thread Index |