OSDN Git Service

rcu: Force on tick when invoking lots of callbacks
authorPaul E. McKenney <paulmck@kernel.org>
Sun, 28 Jul 2019 18:50:56 +0000 (11:50 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 5 Oct 2019 17:46:04 +0000 (10:46 -0700)
commit6a949b7af82db7eb1e52caaed122eab1cf63acee
treea77d4d8a173f604ed2fd465f0c92620653de892b
parentae9e557b5be2e285f48ee945d9c8faf75d4f6a66
rcu: Force on tick when invoking lots of callbacks

Callback invocation can run for a significant time period, and within
CONFIG_NO_HZ_FULL=y kernels, this period will be devoid of scheduler-clock
interrupts.  In-kernel execution without such interrupts can cause all
manner of malfunction, with RCU CPU stall warnings being but one result.

This commit therefore forces scheduling-clock interrupts on whenever more
than a few RCU callbacks are invoked.  Because offloaded callback invocation
can be preempted, this forcing is withdrawn on each context switch.  This
in turn requires that the loop invoking RCU callbacks reiterate the forcing
periodically.

[ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU->TICK_DEP_BIT_RCU fix. ]
[ paulmck: Remove NO_HZ_FULL check per Frederic Weisbecker feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c