RCU: Privatize rcu_node::lock
authorBoqun Feng <boqun.feng@gmail.com>
Tue, 29 Dec 2015 04:18:47 +0000 (12:18 +0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 24 Feb 2016 03:59:54 +0000 (19:59 -0800)
commit67c583a7de3433a971983490b37ad2bff3c55463
treeb6d5123664992047b393594cff856de006fb86b4
parentad315455d396a1cbcb2f9fdd687b7e1b26b789e7
RCU: Privatize rcu_node::lock

In patch:

"rcu: Add transitivity to remaining rcu_node ->lock acquisitions"

All locking operations on rcu_node::lock are replaced with the wrappers
because of the need of transitivity, which indicates we should never
write code using LOCK primitives alone(i.e. without a proper barrier
following) on rcu_node::lock outside those wrappers. We could detect
this kind of misuses on rcu_node::lock in the future by adding __private
modifier on rcu_node::lock.

To privatize rcu_node::lock, unlock wrappers are also needed. Replacing
spinlock unlocks with these wrappers not only privatizes rcu_node::lock
but also makes it easier to figure out critical sections of rcu_node.

This patch adds __private modifier to rcu_node::lock and makes every
access to it wrapped by ACCESS_PRIVATE(). Besides, unlock wrappers are
added and raw_spin_unlock(&rnp->lock) and its friends are replaced with
those wrappers.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_plugin.h
This page took 0.026795 seconds and 5 git commands to generate.