Skip to content

Commit 6fc2171

Browse files
roxellrostedt
authored andcommitted
tracing: Allow RCU to run between postponed startup tests
When building a allmodconfig kernel for arm64 and boot that in qemu, CONFIG_FTRACE_STARTUP_TEST gets enabled and that takes time so the watchdog expires and prints out a message like this: 'watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]' Depending on what the what test gets called from init_trace_selftests() it stays minutes in the loop. Rework so that function cond_resched() gets called in the init_trace_selftests loop. Link: http://lkml.kernel.org/r/20181130145622.26334-1-anders.roxell@linaro.org Co-developed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent bfcd631 commit 6fc2171

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎kernel/trace/trace.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,10 @@ static __init int init_trace_selftests(void)
17221722
pr_info("Running postponed tracer tests:\n");
17231723

17241724
list_for_each_entry_safe(p, n, &postponed_selftests, list) {
1725+
/* This loop can take minutes when sanitizers are enabled, so
1726+
* lets make sure we allow RCU processing.
1727+
*/
1728+
cond_resched();
17251729
ret = run_tracer_selftest(p->type);
17261730
/* If the test fails, then warn and remove from available_tracers */
17271731
if (ret < 0) {

0 commit comments

Comments
 (0)