Notes:
Sometime ago, during a discussion on lock-free lookups, it was
agreed that an additional memory barrier interface, read_barrier_depends()
that is lighter than an rmb(), is necessary to make sure that data-dependent
reads are not re-ordered over this barrier. For many processors,
data-dependency enforces order, so this interface is a NOP, but
for alpha it is an rmb(). The discussion can be found at:
http://marc.theaimsgroup.com/?t=100259422200002&r=1&w=2
Sprinkling some witty remarks about IBM's warped sense of mnemonics,
Linus suggested that the all barrier inteface names might as well
be made more explicit.
http://marc.theaimsgroup.com/?l=linux-kernel&m=100290433130211&w=2
Paul McKenney wrote a patch that has all these
- memory_barrier()
- read_barrier()
- read_barrier_depends()
- write_barrier()
Existing barrier interfaces of course continue to be supported.
|