• Paul E. McKenney's avatar
    [PATCH] RCU: eliminating explicit memory barriers from SysV IPC · 3f9fabe7
    Paul E. McKenney authored
    This patch uses the rcu_assign_pointer() API to eliminate a number of explicit
    memory barriers from the SysV IPC code that uses RCU.  It also restructures
    the ipc_ids structure so that the array size is stored in the same memory
    block as the array itself (see the new struct ipc_id_ary).  This prevents the
    race that the earlier code was subject to, where a reader could see a mismatch
    between the size and the actual array.  With the size stored with the array,
    the possibility of mismatch is eliminated -- with out the need for careful
    ordering and explicit memory barriers.  This has been tested successfully on
    i386 and ppc64.
    
    Signed-off-by: <paulmck@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    3f9fabe7
util.h 2.31 KB