]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Apply smp_mb__after_unlock_lock() to preserve grace periods
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 11 Dec 2013 21:59:10 +0000 (13:59 -0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 16 Dec 2013 10:36:16 +0000 (11:36 +0100)
commit99524d6ed44d64431deb7c9aa67906a98fcd0015
treeffadb26316714834e26898f5fae6a9fa0f463934
parent1589043ddc171dfb8d2b00c3da07b0102e8d88dd
rcu: Apply smp_mb__after_unlock_lock() to preserve grace periods

RCU must ensure that there is the equivalent of a full memory
barrier between any memory access preceding grace period and any
memory access following that same grace period, regardless of
which CPU(s) happen to execute the two memory accesses.
Therefore, downgrading UNLOCK+LOCK to no longer imply a full
memory barrier requires some adjustments to RCU.

This commit therefore adds smp_mb__after_unlock_lock()
invocations as needed after the RCU lock acquisitions that need
to be part of a full-memory-barrier UNLOCK+LOCK.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: <linux-arch@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1386799151-2219-7-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h