From: Nicolas Saenz Julienne <nsaenzju@redhat.com>
To: mingo@redhat.com, peterz@infradead.org, frederic@kernel.org,
rostedt@goodmis.org
Cc: tglx@linutronix.de, mtosatti@redhat.com, bristot@redhat.com,
linux-kernel@vger.kernel.org,
Nicolas Saenz Julienne <nsaenzju@redhat.com>
Subject: [RESEND PATCH 2/2] tracing: Avoid isolated CPUs when queueing fsnotify irqwork
Date: Mon, 28 Feb 2022 15:15:51 +0100 [thread overview]
Message-ID: <20220228141550.260119-2-nsaenzju@redhat.com> (raw)
In-Reply-To: <20220228141550.260119-1-nsaenzju@redhat.com>
Ftrace's fsnotify irq_work doesn't need to be run locally, so avoid
doing so when the CPU is isolated.
Note that this is especially bad when tracing an isolated CPU, as the
noise from running the irq_work might be bigger than what was actually
meant to be traced.
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
kernel/trace/trace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7c85ce9ffdc3..2a3b969708a7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -12,6 +12,7 @@
* Copyright (C) 2004-2006 Ingo Molnar
* Copyright (C) 2004 Nadia Yvette Chambers
*/
+#include <linux/sched/isolation.h>
#include <linux/ring_buffer.h>
#include <generated/utsrelease.h>
#include <linux/stacktrace.h>
@@ -1724,7 +1725,7 @@ void latency_fsnotify(struct trace_array *tr)
* possible that we are called from __schedule() or do_idle(), which
* could cause a deadlock.
*/
- irq_work_queue(&tr->fsnotify_irqwork);
+ irq_work_queue_on(&tr->fsnotify_irqwork, housekeeping_any_cpu(HK_FLAG_MISC));
}
#elif defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
--
2.35.1
next prev parent reply other threads:[~2022-02-28 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 14:15 [RESEND PATCH 1/2] sched/isolation: Use raw_smp_processor_id() in housekeeping_any_cpu() Nicolas Saenz Julienne
2022-02-28 14:15 ` Nicolas Saenz Julienne [this message]
2022-02-28 18:07 ` [RESEND PATCH 2/2] tracing: Avoid isolated CPUs when queueing fsnotify irqwork kernel test robot
2022-02-28 18:20 ` Nicolas Saenz Julienne
2022-02-28 19:49 ` kernel test robot
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=20220228141550.260119-2-nsaenzju@redhat.com \
--to=nsaenzju@redhat.com \
--cc=bristot@redhat.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®