Skip to content

Commit 4355080

Browse files
committed
rcutorture: Refrain from callback flooding during boot
Additional rcutorture aggression can result in, believe it or not, boot times in excess of three minutes on large hyperthreaded systems. This is long enough for rcutorture to decide to do some callback flooding, which seems a bit excessive given that userspace cannot have started until long after boot, and it is userspace that does the real-world callback flooding. Worse yet, because Tiny RCU lacks forward-progress functionality, the looping-in-the-kernel tests can also be problematic during early boot. This commit therefore causes rcutorture to hold off on callback flooding until about the time that init is spawned, and the same for looping-in-the-kernel tests for Tiny RCU. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 90e23b6 commit 4355080

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kernel/rcu/rcutorture.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,8 +1994,11 @@ static int rcu_torture_fwd_prog(void *args)
19941994
schedule_timeout_interruptible(fwd_progress_holdoff * HZ);
19951995
WRITE_ONCE(rcu_fwd_emergency_stop, false);
19961996
register_oom_notifier(&rcutorture_oom_nb);
1997-
rcu_torture_fwd_prog_nr(rfp, &tested, &tested_tries);
1998-
rcu_torture_fwd_prog_cr(rfp);
1997+
if (!IS_ENABLED(CONFIG_TINY_RCU) ||
1998+
rcu_inkernel_boot_has_ended())
1999+
rcu_torture_fwd_prog_nr(rfp, &tested, &tested_tries);
2000+
if (rcu_inkernel_boot_has_ended())
2001+
rcu_torture_fwd_prog_cr(rfp);
19992002
unregister_oom_notifier(&rcutorture_oom_nb);
20002003

20012004
/* Avoid slow periods, better to test when busy. */

0 commit comments

Comments
 (0)