rcu: Enable tick for nohz_full CPUs slow to provide expedited QS
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 28 Nov 2019 00:36:45 +0000 (16:36 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 9 Dec 2019 20:32:59 +0000 (12:32 -0800)
commitdf1e849ae4559544ff00ff5052eefe2479750539
treebe1bac3d41c0d6daec68af70e174ff0896599430
parent28f0361fdfab267a392cd6a6401446c9ea64de95
rcu: Enable tick for nohz_full CPUs slow to provide expedited QS

An expedited grace period can be stalled by a nohz_full CPU looping
in kernel context.  This possibility is currently handled by some
carefully crafted checks in rcu_read_unlock_special() that enlist help
from ksoftirqd when permitted by the scheduler.  However, it is exactly
these checks that require the scheduler avoid holding any of its rq or
pi locks across rcu_read_unlock() without also having held them across
the entire RCU read-side critical section.

It would therefore be very nice if expedited grace periods could
handle nohz_full CPUs looping in kernel context without such checks.
This commit therefore adds code to the expedited grace period's wait
and cleanup code that forces the scheduler-clock interrupt on for CPUs
that fail to quickly supply a quiescent state.  "Quickly" is currently
a hard-coded single-jiffy delay.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/tick.h
kernel/rcu/tree.h
kernel/rcu/tree_exp.h