]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Call wake_nocb_leader_defer() with 'FORCE' when nocb_q_count is high
authorByungchul Park <byungchul.park@lge.com>
Wed, 28 Feb 2018 05:49:02 +0000 (14:49 +0900)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:27:18 +0000 (10:27 -0700)
commit240df1e2b952562eed964c106528f6b564370ff7
treeaf73bfbc86bd23392d924f24c61ec76ff9facf44
parentade8cbf42eda4fa43abbca25a4d6e8395d6f7efb
rcu: Call wake_nocb_leader_defer() with 'FORCE' when nocb_q_count is high

If an excessive number of callbacks have been queued, but the NOCB
leader kthread's wakeup must be deferred, then we should wake up the
leader unconditionally once it is safe to do so.

This was handled correctly in commit f1f0f3764f ("rcu: Parallelize and
economize NOCB kthread wakeups"), but then commit 7e93954bfd ("rcu:
Use timer as backstop for NOCB deferred wakeups") passed RCU_NOCB_WAKE
instead of the correct RCU_NOCB_WAKE_FORCE to wake_nocb_leader_defer().
As an interesting aside, RCU_NOCB_WAKE_FORCE is never passed to anything,
which should have been taken as a hint.  ;-)

This commit therefore passes RCU_NOCB_WAKE_FORCE instead of RCU_NOCB_WAKE
to wake_nocb_leader_defer() when a callback is queued onto a NOCB CPU
that already has an excessive number of callbacks pending.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
kernel/rcu/tree_plugin.h