Re: Memory Barrier Definitions

Dave Engebretsen (engebret@vnet.ibm.com)
Tue, 07 May 2002 14:53:34 -0500


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.

Dave.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/