Re: Memory Barrier Definitions

From: Dave Engebretsen (
Date: Tue May 07 2002 - 14:53:34 EST

Alan Cox wrote:
> > A solution was pointed out by Rusty Russell that we should probabily be
> > using smp_*mb() for system memory ordering and reserve the *mb() calls
> For pure compiler level ordering we have barrier()
> Alan

Sure, but none of these issues I think need disscussion are a compiler
reordering. Perhaps you are just pointing out another barrier primitive
to provide a more complete listing? There are some others, such as the
*before_atomic* that will require a seperate discussion, I think.

In case my point was not clear, I'll restate: where PowerPC (at a
minimum) gets into trouble is with the seperate ordering between
references to system memory and to I/O space with respect to the various
forms of processor memory barrier instructions. It is _very_ expensive
to blindly force all memory references to be ordered completely to the
seperate spaces. The use of wmb(), rmb(), and mb() is overloaded in the
context of PowerPC.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:31 EST