rcu: Restrict RCU_STRICT_GRACE_PERIOD to at most four CPUs
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 7 Apr 2021 22:21:32 +0000 (15:21 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 10 May 2021 23:22:54 +0000 (16:22 -0700)
Kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y can experience
significant lock contention due to RCU's resulting focus on ending grace
periods as soon as possible.  This is OK, but only if there are not very
many CPUs.  This commit therefore puts this Kconfig option off-limits
to systems with more than four CPUs.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/Kconfig.debug

index 1942c1f1bb65d32ef9ccccbb1b7bd5799c831298..4fd64999300fc229bea06793861adae6042a697b 100644 (file)
@@ -116,7 +116,7 @@ config RCU_EQS_DEBUG
 
 config RCU_STRICT_GRACE_PERIOD
        bool "Provide debug RCU implementation with short grace periods"
-       depends on DEBUG_KERNEL && RCU_EXPERT
+       depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4
        default n
        select PREEMPT_COUNT if PREEMPT=n
        help