]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Decrease FQS scan wait time in case of callback overloading
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 12 Apr 2022 22:08:14 +0000 (15:08 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 19 Jul 2022 18:39:59 +0000 (11:39 -0700)
commitc87c2fa6c28e13c66c34c4d9228a486fc637ef9d
tree88c1bb8e9d5ca76f0efe4b7369e8bf731fed7cc9
parent3d10cebcd1d46262c83c4e6a132e92969977ef49
rcu: Decrease FQS scan wait time in case of callback overloading

The force-quiesce-state loop function rcu_gp_fqs_loop() checks for
callback overloading and does an immediate initial scan for idle CPUs
if so.  However, subsequent rescans will be carried out at as leisurely a
rate as they always are, as specified by the rcutree.jiffies_till_next_fqs
module parameter.  It might be tempting to just continue immediately
rescanning, but this turns the RCU grace-period kthread into a CPU hog.
It might also be tempting to reduce the time between rescans to a single
jiffy, but this can be problematic on larger systems.

This commit therefore divides the normal time between rescans by three,
rounding up.  Thus a small system running at HZ=1000 that is suffering
from callback overload will wait only one jiffy instead of the normal
three between rescans.

[ paulmck: Apply Neeraj Upadhyay feedback. ]

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
kernel/rcu/tree.c