tracing: Have tracer selftests call cond_resched() before running
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 28 May 2023 05:17:39 +0000 (01:17 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 29 May 2023 01:15:17 +0000 (21:15 -0400)
commit9da705d432a07927526005a0688d81fbbf30e349
tree73abdfa23b84c1c414fcec0ecbfbbf3cfcaa5893
parente8352cf5778c53b80fdcee086278b2048ddb8f98
tracing: Have tracer selftests call cond_resched() before running

As there are more and more internal selftests being added to the Linux
kernel (KSAN, lockdep, etc) the selftests are taking longer to run when
these are enabled. Add a cond_resched() to the calling of
do_run_tracer_selftest() to force a schedule if NEED_RESCHED is set,
otherwise the soft lockup watchdog may trigger on boot up.

Link: https://lkml.kernel.org/r/20230528051742.1325503-3-rostedt@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c