]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Accommodate zero jiffies_till_first_fqs and kthread kicking
authorPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 20 Nov 2018 18:43:34 +0000 (10:43 -0800)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 25 Jan 2019 23:29:53 +0000 (15:29 -0800)
commit4e500ad4106eb9c4e92aa024133e5e924033135a
tree78a31267b797687ffb383d2e9de879874f3bdc3c
parentd912f141aaffb32615e1249a1a2d28a5e6f58fde
rcu: Accommodate zero jiffies_till_first_fqs and kthread kicking

It is perfectly fine to set the rcutree.jiffies_till_first_fqs boot
parameter to zero, in fact, this can be useful on specialty systems that
usually have at least one idle CPU and that need fast grace periods.
This is because this setting causes the RCU grace-period kthread to
scan for idle threads immediately after grace-period initialization,
as opposed to waiting several jiffies to do so.

It is also perfectly fine to set the rcutree.rcu_kick_kthreads kernel
parameter, which gives the RCU grace-period kthread an extra wakeup
if it doesn't make progress for a period of three times the setting of
the rcutree.jiffies_till_first_fqs boot parameter.  This is of course
problematic when the value of this parameter is zero, as it can result
in unnecessary wakeup IPIs along with unnecessary WARN_ONCE() invocations.

This commit therefore defers kthread kicking for at least two jiffies,
regardless of the setting of rcutree.jiffies_till_first_fqs.

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