EXP rcutorture: Limit callback flooding for Tiny SRCU in preemptible kernels
This commit further limits callback flooding from 50,000 callbacks
to 1,000 for rcutorture testing of Tiny SRCU in preemptible kernels.
The single-CPU systems are susceptible to CPU overload, while the
preemption increases the probability of SRCU read-side preemption.
This does not go well because SRCU has no reader priority boosting.
This also militates against formal support of Tiny SRCU in preemptible
kernels.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 706add9..5bb0741 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -750,7 +750,7 @@ static struct rcu_torture_ops srcu_ops = {
.cb_barrier = srcu_torture_barrier,
.stats = srcu_torture_stats,
.get_gp_data = srcu_get_gp_data,
- .cbflood_max = 50000,
+ .cbflood_max = !IS_ENABLED(CONFIG_SMP) && IS_ENABLED(CONFIG_PREEMPTION) ? 1000 : 50000,
.irq_capable = 1,
.no_pi_lock = IS_ENABLED(CONFIG_TINY_SRCU),
.debug_objects = 1,
@@ -793,7 +793,7 @@ static struct rcu_torture_ops srcud_ops = {
.cb_barrier = srcu_torture_barrier,
.stats = srcu_torture_stats,
.get_gp_data = srcu_get_gp_data,
- .cbflood_max = 50000,
+ .cbflood_max = !IS_ENABLED(CONFIG_SMP) && IS_ENABLED(CONFIG_PREEMPTION) ? 1000 : 50000,
.irq_capable = 1,
.no_pi_lock = IS_ENABLED(CONFIG_TINY_SRCU),
.debug_objects = 1,