Re: [PATCH 2/2] I386 convert pae wmb to non smp

From: Nick Piggin
Date: Wed Apr 26 2006 - 23:31:12 EST


Zachary Amsden wrote:

Nick Piggin wrote:

wmb() means that it also orders IO memory. It is no difference for
i386, but smp_wmb() actually has the right semantics of the abstract
Linux memory model.


The name is pretty confused. smp_wmb seems to imply an SMP-only barrier, whereas we want here a write barrier on regular memory.


That is just a compiler barrier (barrier()). A CPU should always be consistent with
itself so memory ordering doesn't really apply there (hence smp_ prefix, which also
are compiler barriers, of course).

Both smp_wmb and wmb() are identical in that they both reduce to barrier today, but I confess not to know which one semantically is correct.


Well you're only looking at i386. True it is i386 specific code, but sticking
to the Linux memory model is more clear and consistent I think.

Your call on this patch - it is unecessary, I thought it was more semantically correct, but you probably know that better than me. So, drop part 2 of this patch?


Yes, and make part 1 use smp_wmb.

--

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/