Re: [PATCH RFC 1/7] rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader
From: Sebastian Andrzej Siewior
Date: Fri Nov 13 2026 - 13:40:19 EST
On 2026-11-11 16:38:19 [-0500], Joel Fernandes wrote:
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -149,6 +149,7 @@ torture_param(int, test_boost, 1, "Test RCU prio boost: 0=no, 1=maybe, 2=yes.");
> torture_param(int, test_boost_duration, 4, "Duration of each boost test, seconds.");
> torture_param(int, test_boost_holdoff, 0, "Holdoff time from rcutorture start, seconds.");
> torture_param(int, test_boost_interval, 7, "Interval between boost tests, seconds.");
> +torture_param(int, test_boost_reader_ms, 2000, "Boost-test reader CPU time, ms.");
That that I look again later where you add the Documentation for this:
You should check that this parameter is in range (not too small (<0) not
to too large maybe). rcu_torture_init() checks also other.
> torture_param(int, test_nmis, 0, "End-test NMI tests, 0 to disable.");
> torture_param(bool, test_no_idle_hz, true, "Test support for tickless idle CPUs");
> torture_param(int, test_srcu_lockdep, 0, "Test specified SRCU deadlock scenario.");
> @@ -1366,61 +1375,111 @@ static void rcu_torture_enable_rt_throttle(void)
…
> + smp_mb(); // Time check before reader check.
> + if (!READ_ONCE(br.finished) && !stuttered && !torture_must_stop()) {
> VERBOSE_TOROUT_STRING("rcu_torture_boost boosting failed");
> n_rcu_torture_boost_failure++;
> + pr_info("Boost inversion: reader got only %llu of %d ms CPU in %lu jiffies, GP %s.\n",
> + READ_ONCE(br.ran_ns) / NSEC_PER_MSEC, test_boost_reader_ms, jiffies - start,
rcu_torture_boost_reader::ran_ns is u64 so this needs to be something
like div64_ul().
Sebastian