Linux Operating System Source Code: IBM Patches

 
memory barriers
Description:
memory barriers patch originally written by Paul McKenney. It has been sanity tested UP/SMP on i386, but needs testing on other architectures. Typically read_barrier_depends() will be needed to support lockfree lookups using RCU (or otherwise) in order to execute correctly on processors with very weak memory ordering.
Developers:
Dipankar Sarma, Paul McKenney
Status:
Included in project
Release Included:
linux-2.5.44

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.

Release Notes Date Files
2.5.42 Release Notes 2002-11-21  
  File Notes   read_barrier_depends-2.5.42-1.patch.gz

Show all releases