Skip to content

Commit 65bd77f

Browse files
committed
scftorture: Add cond_resched() to test loop
Although the test loop does randomly delay, which would provide quiescent states and so forth, it is possible for there to be a series of long smp_call_function*() handler runtimes with no delays, which results in softlockup and RCU CPU stall warning messages. This commit therefore inserts a cond_resched() into the main test loop. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 9e66bf0 commit 65bd77f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/scftorture.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ static int scftorture_invoker(void *arg)
420420
set_cpus_allowed_ptr(current, cpumask_of(cpu));
421421
was_offline = false;
422422
}
423+
cond_resched();
423424
} while (!torture_must_stop());
424425

425426
VERBOSE_SCFTORTOUT("scftorture_invoker %d ended", scfp->cpu);

0 commit comments

Comments
 (0)