Re: [PATCH] tracing: Remove pointless memory barriers

From: Steven Rostedt
Date: Thu Jun 26 2025 - 11:42:17 EST


On Thu, 26 Jun 2025 11:35:20 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > @@ -2710,8 +2705,6 @@ void trace_buffered_event_enable(void)
> >
> > static void enable_trace_buffered_event(void *data)
> > {
> > - /* Probably not needed, but do it anyway */
> > - smp_rmb();
>
> As the comment says, this one actually isn't needed, and yes, it can be
> removed.

One reason this isn't needed is because it's called via on_each_cpu() which
will trigger its own barriers.

-- Steve