[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=W_xhfT=oVq9qXvRqUuhG5_Wvi9=mtV+GAh+Nwvp6a7Pg@mail.gmail.com>
Date: Fri, 9 May 2025 08:49:06 -0700
From: Doug Anderson <dianders@...omium.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>, Jason Wessel <jason.wessel@...driver.com>,
Daniel Thompson <danielt@...nel.org>
Subject: Re: [for-next][PATCH 18/31] tracing: kdb: Use tracer_tracing_on/off()
instead of setting per CPU disabled
Hi,
On Fri, May 9, 2025 at 6:13 AM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> From: Steven Rostedt <rostedt@...dmis.org>
>
> The per CPU "disabled" value was the original way to disable tracing when
> the tracing subsystem was first created. Today, the ring buffer
> infrastructure has its own way to disable tracing. In fact, things have
> changed so much since 2008 that many things ignore the disable flag.
>
> The kdb_ftdump() function iterates over all the current tracing CPUs and
> increments the "disabled" counter before doing the dump, and decrements it
> afterward.
>
> As the disabled flag can be ignored, doing this today is not reliable.
> Instead, simply call tracer_tracing_off() and then tracer_tracing_on() to
> disable and then enabled the entire ring buffer in one go!
>
> Cc: Jason Wessel <jason.wessel@...driver.com>
> Cc: Masami Hiramatsu <mhiramat@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Daniel Thompson <danielt@...nel.org>
> Cc: Douglas Anderson <dianders@...omium.org>
> Link: https://lore.kernel.org/20250505212235.549033722@goodmis.org
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> kernel/trace/trace_kdb.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
I'm not deeply familiar with the tracing system internals, but it
seems reasonable to me.
I did a quick sanity check and nothing went boom, too.
Reviewed-by: Douglas Anderson <dianders@...omium.org>
Powered by blists - more mailing lists