[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240220202002.38fec245@gandalf.local.home>
Date: Tue, 20 Feb 2024 20:20:02 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Daniel Bristot de Oliveira
<bristot@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>, Juri
Lelli <juri.lelli@...hat.com>
Subject: [PATCH] sched/clock: Make local_clock() notrace
From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
The "perf" clock in /sys/kernel/tracing/trace_clock enables local_clock(),
where on machines that have CONFIG_HAVE_UNSTABLE_SCHED_CLOCK set is a
normal function. This function can be traced.
I found that enabling the "perf" clock on some debug configs and running
function tracer can live lock the machine. That is, it goes so slow that
nothing moves forward.
Cc: stable@...r.kernel.org
Fixes: fb7d4948c4da2 ("sched/clock: Provide local_clock_noinstr()")
Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
---
kernel/sched/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
index 3c6193de9cde..af8b698dee8c 100644
--- a/kernel/sched/clock.c
+++ b/kernel/sched/clock.c
@@ -308,7 +308,7 @@ noinstr u64 local_clock_noinstr(void)
return clock;
}
-u64 local_clock(void)
+notrace u64 local_clock(void)
{
u64 now;
preempt_disable_notrace();
--
2.43.0
Powered by blists - more mailing lists