Re: [PATCH] x86 bitops.h commentary on instruction reordering

From: Vladislav Bolkhovitin
Date: Fri Aug 06 2004 - 10:47:02 EST


Thanks.

One more question, if you don't object. How after some variable assigment to make other CPUs *immediatelly* see the assigned value, i.e. to make current CPU immediately flush its write cache in memory? *mb() seems deal with reordering, barrier() with the compiler optimization (am I right?). The similar memory barrier spin_lock() does, but it's not easy to uderstand its internal magic.

Vlad

Marcelo Tosatti wrote:
On Fri, Aug 06, 2004 at 06:17:04PM +0400, Vladislav Bolkhovitin wrote:

So, is there any way to workaround this problem, i.e. prevent bit operations reordering on non-x86 architectures? Some kinds of memory barriers?


Memory barriers, yes, smp_mb(), rmb, wmb and friends.



-
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/