]> asedeno.scripts.mit.edu Git - linux.git/commit
rcu/nocb: Reduce contention at no-CBs registry-time CB advancement
authorPaul E. McKenney <paulmck@linux.ibm.com>
Sat, 1 Jun 2019 13:16:38 +0000 (06:16 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 13 Aug 2019 21:35:49 +0000 (14:35 -0700)
commit6608c3a027bcc0b34cc02bc764ea9f52b9dce46f
tree6ea50ee8604de4ceee619c830ad2fc1d3c3720a9
parent9fcb09bddd56bae42319b606bae86e85c625f868
rcu/nocb: Reduce contention at no-CBs registry-time CB advancement

Currently, __call_rcu_nocb_wake() conditionally acquires the leaf rcu_node
structure's ->lock, and only afterwards does rcu_advance_cbs_nowake()
check to see if it is possible to advance callbacks without potentially
needing to awaken the grace-period kthread.  Given that the no-awaken
check can be done locklessly, this commit reverses the order, so that
rcu_advance_cbs_nowake() is invoked without holding the leaf rcu_node
structure's ->lock and rcu_advance_cbs_nowake() checks the grace-period
state before conditionally acquiring that lock, thus reducing the number
of needless acquistions of the leaf rcu_node structure's ->lock.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h