From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: [for-next][PATCH 1/6] tracing: Have osnoise_main() add a quiescent state for task rcu
Date: Tue, 29 Jun 2021 07:48:12 -0400 [thread overview]
Message-ID: <20210629114850.975139884@goodmis.org> (raw)
In-Reply-To: 20210629114811.473560262@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
ftracetest triggered:
INFO: rcu_tasks detected stalls on tasks:
00000000b92b832d: .. nvcsw: 1/1 holdout: 1 idle_cpu: -1/7
task:osnoise/7 state:R running task stack: 0 pid: 2133 ppid: 2 flags:0x00004000
Call Trace:
? asm_sysvec_apic_timer_interrupt+0x12/0x20
? asm_sysvec_apic_timer_interrupt+0x12/0x20
? trace_hardirqs_on+0x2b/0xe0
? asm_sysvec_apic_timer_interrupt+0x12/0x20
? trace_clock_local+0xc/0x20
? osnoise_main+0x10e/0x450
? trace_softirq_entry_callback+0x50/0x50
? kthread+0x153/0x170
? __kthread_bind_mask+0x60/0x60
? ret_from_fork+0x22/0x30
While running osnoise tracer with other tracers that rely on
synchronize_rcu_tasks(), where that just hung.
The reason is that osnoise_main() never schedules out if the interval
is less than 1, and this will cause synchronize_rcu_tasks() to never
return.
Link: https://lkml.kernel.org/r/20210628114953.6dc06a91@oasis.local.home
Fixes: bce29ac9ce0bb ("trace: Add osnoise tracer")
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_osnoise.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 38aa5e208ffd..556d530af805 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1216,8 +1216,11 @@ static int osnoise_main(void *data)
* differently from hwlat_detector, the osnoise tracer can run
* without a pause because preemption is on.
*/
- if (interval < 1)
+ if (interval < 1) {
+ /* Let synchronize_rcu_tasks() make progress */
+ cond_resched_tasks_rcu_qs();
continue;
+ }
if (msleep_interruptible(interval))
break;
--
2.30.2
next prev parent reply other threads:[~2021-06-29 11:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 11:48 [for-next][PATCH 0/6] tracing: Minor fixes Steven Rostedt
2021-06-29 11:48 ` Steven Rostedt [this message]
2021-06-29 11:48 ` [for-next][PATCH 2/6] trace/osnoise: Fix no previous prototype warnings Steven Rostedt
2021-06-29 11:48 ` [for-next][PATCH 3/6] trace/osnoise: Make interval u64 on osnoise_main Steven Rostedt
2021-06-29 11:48 ` [for-next][PATCH 4/6] trace/osnoise: Fix return value on osnoise_init_hotplug_support Steven Rostedt
2021-06-29 11:48 ` [for-next][PATCH 5/6] Documentation: Fix a typo on trace/osnoise-tracer Steven Rostedt
2021-06-29 11:48 ` [for-next][PATCH 6/6] tracing: Fix spelling in osnoise tracer "interferences" -> "interference" Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210629114850.975139884@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=bristot@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).