Re: [PATCH] tracing: Remove pointless memory barriers

From: Steven Rostedt
Date: Mon Jul 21 2025 - 20:49:21 EST


On Thu, 26 Jun 2025 18:04:59 +0200
Nam Cao <namcao@xxxxxxxxxxxxx> wrote:

> > The above three interact with each other. Without the barriers, the
> > tr->buffer_disabled = 0, can be set on one CPU, and the other CPU can think
> > the buffer is still enabled and do work that will end up doing nothing. Or
> > it can be set to 1, and the other CPU still sees it disabled and will not
> > do work when it can.
>
> (I'm not that experienced with memory barrier, so I may be writing nonsense
> here)

So I did some git archeology and realized that the buffer_disabled is just
a cache to make irqsoff tracing faster. The commit even said it's not going
to be accurate.

OK, I'll just take this patch.

Thanks,

-- Steve