]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
rcu: Make rcu_migrate_callbacks wake GP kthread when needed
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 22 Apr 2018 15:49:24 +0000 (08:49 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:29:51 +0000 (10:29 -0700)
commitec4eaccef4af28376345554580606a43d7392ed8
treea5aec9ba6b05c9f6ffdfd95bdf4ac891c904a368
parent6f576e281690316270275bbef17c79ea304ad511
rcu: Make rcu_migrate_callbacks wake GP kthread when needed

The rcu_migrate_callbacks() function invokes rcu_advance_cbs()
twice, ignoring the return value.  This is OK at pressent because of
failsafe code that does the wakeup when needed.  However, this failsafe
code acquires the root rcu_node structure's lock frequently, while
rcu_migrate_callbacks() does so only once per CPU-offline operation.

This commit therefore makes rcu_migrate_callbacks()
wake up the RCU GP kthread when either call to rcu_advance_cbs()
returns true, thus removing need for the failsafe code.

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