[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220228141550.260119-2-nsaenzju@redhat.com>
Date: Mon, 28 Feb 2022 15:15:51 +0100
From: Nicolas Saenz Julienne <nsaenzju@...hat.com>
To: mingo@...hat.com, peterz@...radead.org, frederic@...nel.org,
rostedt@...dmis.org
Cc: tglx@...utronix.de, mtosatti@...hat.com, bristot@...hat.com,
linux-kernel@...r.kernel.org,
Nicolas Saenz Julienne <nsaenzju@...hat.com>
Subject: [RESEND PATCH 2/2] tracing: Avoid isolated CPUs when queueing fsnotify irqwork
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@...hat.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
Powered by blists - more mailing lists