]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Avoid __call_rcu_core() root rcu_node ->lock acquisition
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 11 Apr 2018 21:33:18 +0000 (14:33 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:29:57 +0000 (10:29 -0700)
commit894d1f74c36637d7b82ccac9bc7792a20f46da68
tree5e721a38d4ef5bf23e618fc98b1c230546321bb5
parent210c938932c5b0130ef564148494e0c1d5a9294d
rcu: Avoid __call_rcu_core() root rcu_node ->lock acquisition

When __call_rcu_core() notices excessive numbers of callbacks pending
on the current CPU, we know that at least one of them is not yet
classified, namely the one that was just now queued.  Therefore, it
is not necessary to invoke rcu_start_gp() and thus not necessary to
acquire the root rcu_node structure's ->lock.  This commit therefore
replaces the rcu_start_gp() with rcu_accelerate_cbs(), thus replacing
an acquisition of the root rcu_node structure's ->lock with that of
this CPU's leaf rcu_node structure.

This decreases contention on the root rcu_node structure's ->lock.

Reported-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
kernel/rcu/tree.c