rcu/nocb: Unconditionally advance and wake for excessive CBs
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 26 Jun 2019 16:50:38 +0000 (09:50 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 13 Aug 2019 21:35:49 +0000 (14:35 -0700)
commitfaca5c250935262f026cac1bb951a0f7672474b8
tree189d5640bf90a793916b66b0f77223f0411d8eca
parent4fd8c5f153bc41ae847b9ddb1539b34f70c18278
rcu/nocb: Unconditionally advance and wake for excessive CBs

When there are excessive numbers of callbacks, and when either the
corresponding no-CBs callback kthread is asleep or there is no more
ready-to-invoke callbacks, and when least one callback is pending,
__call_rcu_nocb_wake() will advance the callbacks, but refrain from
awakening the corresponding no-CBs grace-period kthread.  However,
because rcu_advance_cbs_nowake() is used, it is possible (if a bit
unlikely) that the needed advancement could not happen due to a grace
period not being in progress.  Plus there will always be at least one
pending callback due to one having just now been enqueued.

This commit therefore attempts to advance callbacks and awakens the
no-CBs grace-period kthread when there are excessive numbers of callbacks
posted and when the no-CBs callback kthread is not in a position to do
anything helpful.

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