Re: [PATCH] tracing: Allow the top level trace_marker to write into another instance
From: Steven Rostedt
Date: Wed Apr 09 2025 - 12:32:09 EST
On Wed, 9 Apr 2025 12:18:22 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> > The top level instance can set this option but it can not clear it, and
> > it will bring the writing of the trace_marker back to its buffer.
>
> Why choose to redirect the top level trace marker from the global
> buffer to the specific one rather than allow it to iterate on a
> set of "interested" buffers ?
Hmm, interesting idea. I guess we could do it that way instead, although it
may cause a bit more overhead needing to keep track of the buffers that are
interested and also make sure they do not disappear.
I guess this could be done only in the write system call and the open
doesn't get affected. I guess the list of "interested buffers" can be
maintained by RCU, so that when a write happens, it writes to each
interested buffer via a list_for_each_entry_rcu(), under a RCU read lock so
that the buffers do not disappear when writing to them.
Masami, what do you think?
-- Steve