Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH] tracing: Allow the top level trace_marker to write into another instance
Date: Wed, 9 Apr 2025 12:28:53 -0400	[thread overview]
Message-ID: <20250409122853.7e5a29e6@gandalf.local.home> (raw)
In-Reply-To: <1516bba1-15ea-4b8a-ac83-e7db98b37397@efficios.com>

On Wed, 9 Apr 2025 12:18:22 -0400
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> 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

      reply	other threads:[~2025-04-09 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 15:27 [PATCH] tracing: Allow the top level trace_marker to write into another instance Steven Rostedt
2025-04-09 16:18 ` Mathieu Desnoyers
2025-04-09 16:28   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250409122853.7e5a29e6@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox