]> www.infradead.org Git - users/hch/misc.git/commitdiff
torture: Delay CPU-hotplug operations until boot completes
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 14 Aug 2025 03:16:29 +0000 (20:16 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 14 Aug 2025 22:26:30 +0000 (15:26 -0700)
CPU-hotplug operations invoke stop-machine, which 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/torture.c

index 5abb4b25d971cc39833e945a49c370078d815571..1ea9f67953a76641c1c581bf21197b56fec6f5ea 100644 (file)
@@ -359,6 +359,8 @@ torture_onoff(void *arg)
                torture_hrtimeout_jiffies(onoff_holdoff, &rand);
                VERBOSE_TOROUT_STRING("torture_onoff end holdoff");
        }
+       while (!rcu_inkernel_boot_has_ended())
+               schedule_timeout_interruptible(HZ / 10);
        while (!torture_must_stop()) {
                if (disable_onoff_at_boot && !rcu_inkernel_boot_has_ended()) {
                        torture_hrtimeout_jiffies(HZ / 10, &rand);