Skip to content

Commit aecd34b

Browse files
committed
rcu: Restrict default jiffies_till_first_fqs for strict RCU GPs
If there are idle CPUs, RCU's grace-period kthread will wait several jiffies before even thinking about polling them. This promotes efficiency, which is normally a good thing, but when the kernel has been built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, we care more about short grace periods. This commit therefore restricts the default jiffies_till_first_fqs value to zero in kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, which causes RCU's grace-period kthread to poll for idle CPUs immediately after starting a grace period. Reported-by Jann Horn <jannh@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent dc12691 commit aecd34b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/rcu/tree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ module_param(qhimark, long, 0444);
485485
module_param(qlowmark, long, 0444);
486486
module_param(qovld, long, 0444);
487487

488-
static ulong jiffies_till_first_fqs = ULONG_MAX;
488+
static ulong jiffies_till_first_fqs = IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD) ? 0 : ULONG_MAX;
489489
static ulong jiffies_till_next_fqs = ULONG_MAX;
490490
static bool rcu_kick_kthreads;
491491
static int rcu_divisor = 7;

0 commit comments

Comments
 (0)