]> www.infradead.org Git - users/hch/misc.git/commitdiff
rcutorture: Delay forward-progress testing until boot completes
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 14 Aug 2025 03:41:04 +0000 (20:41 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 14 Aug 2025 22:26:30 +0000 (15:26 -0700)
Forward-progress testing can hog CPUs, which is not a great thing to do
before boot has completed.  This commit therefore makes the CPU-hotplug
operations hold off until boot has completed.

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

index 1578d3305657528865c3cfda715d48e13c89b2b8..b8a684459381f21bcbb96793006da251f524c812 100644 (file)
@@ -3457,6 +3457,8 @@ static int rcu_torture_fwd_prog(void *args)
        int tested_tries = 0;
 
        VERBOSE_TOROUT_STRING("rcu_torture_fwd_progress task started");
+       while (!rcu_inkernel_boot_has_ended())
+               schedule_timeout_interruptible(HZ / 10);
        rcu_bind_current_to_nocb();
        if (!IS_ENABLED(CONFIG_SMP) || !IS_ENABLED(CONFIG_RCU_BOOST))
                set_user_nice(current, MAX_NICE);