* [PATCH v2] kernel/trace: fix watchdog soft lockup
@ 2018-11-30 14:56 Anders Roxell
2018-11-30 15:18 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2018-11-30 14:56 UTC (permalink / raw)
To: rostedt, mingo; +Cc: akpm, dvyukov, linux-kernel, Anders Roxell, Arnd Bergmann
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.
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>
---
kernel/trace/trace.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 5706599ed534..109becbc81ca 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1547,6 +1547,10 @@ static __init int init_trace_selftests(void)
pr_info("Running postponed tracer tests:\n");
list_for_each_entry_safe(p, n, &postponed_selftests, list) {
+ /* This loop can take minutes when sanitizers are enabled, so
+ * lets make sure we allow RCU processing.
+ */
+ cond_resched();
ret = run_tracer_selftest(p->type);
/* If the test fails, then warn and remove from available_tracers */
if (ret < 0) {
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] kernel/trace: fix watchdog soft lockup
2018-11-30 14:56 [PATCH v2] kernel/trace: fix watchdog soft lockup Anders Roxell
@ 2018-11-30 15:18 ` Steven Rostedt
2019-03-20 11:17 ` Anders Roxell
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2018-11-30 15:18 UTC (permalink / raw)
To: Anders Roxell; +Cc: mingo, akpm, dvyukov, linux-kernel, Arnd Bergmann
On Fri, 30 Nov 2018 15:56:22 +0100
Anders Roxell <anders.roxell@linaro.org> wrote:
> 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.
>
This looks fine to me. Should it be marked for stable, and pushed into
this release cycle, or wait till the next merge window?
-- Steve
> 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>
> ---
> kernel/trace/trace.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 5706599ed534..109becbc81ca 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -1547,6 +1547,10 @@ static __init int init_trace_selftests(void)
> pr_info("Running postponed tracer tests:\n");
>
> list_for_each_entry_safe(p, n, &postponed_selftests, list) {
> + /* This loop can take minutes when sanitizers are enabled, so
> + * lets make sure we allow RCU processing.
> + */
> + cond_resched();
> ret = run_tracer_selftest(p->type);
> /* If the test fails, then warn and remove from available_tracers */
> if (ret < 0) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] kernel/trace: fix watchdog soft lockup
2018-11-30 15:18 ` Steven Rostedt
@ 2019-03-20 11:17 ` Anders Roxell
0 siblings, 0 replies; 3+ messages in thread
From: Anders Roxell @ 2019-03-20 11:17 UTC (permalink / raw)
To: Steven Rostedt
Cc: Ingo Molnar, Andrew Morton, Dmitry Vyukov,
Linux Kernel Mailing List, Arnd Bergmann
On Fri, 30 Nov 2018 at 16:18, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 30 Nov 2018 15:56:22 +0100
> Anders Roxell <anders.roxell@linaro.org> wrote:
>
> > 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.
> >
>
> This looks fine to me. Should it be marked for stable, and pushed into
> this release cycle, or wait till the next merge window?
Steve, I'm sorry for the late reply and no its not urgent.
Maybe it can make it into v5.2 ?
Cheers,
Anders
>
> -- Steve
>
> > 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>
> > ---
> > kernel/trace/trace.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 5706599ed534..109becbc81ca 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -1547,6 +1547,10 @@ static __init int init_trace_selftests(void)
> > pr_info("Running postponed tracer tests:\n");
> >
> > list_for_each_entry_safe(p, n, &postponed_selftests, list) {
> > + /* This loop can take minutes when sanitizers are enabled, so
> > + * lets make sure we allow RCU processing.
> > + */
> > + cond_resched();
> > ret = run_tracer_selftest(p->type);
> > /* If the test fails, then warn and remove from available_tracers */
> > if (ret < 0) {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-20 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 14:56 [PATCH v2] kernel/trace: fix watchdog soft lockup Anders Roxell
2018-11-30 15:18 ` Steven Rostedt
2019-03-20 11:17 ` Anders Roxell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.