[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250721141050.E-MjrEbf@linutronix.de>
Date: Mon, 21 Jul 2025 16:10:50 +0200
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] rv: Remove the nop reactor
On Mon, Jul 21, 2025 at 12:29:24PM +0200, Gabriele Monaco wrote:
> On Mon, 2025-07-21 at 11:47 +0200, Nam Cao wrote:
> > As suggested by the name, the nop reactor does not do anything. It is
> > the
> > default reactor when nothing else is selected.
> >
> > However, the monitors already null-check the reactor function
> > pointers.
> > Thus, instead of a nop reactor, just set the react function pointer
> > to
> > NULL. The nop reactor can then be removed.
> >
> > Signed-off-by: Nam Cao <namcao@...utronix.de>
>
> Thanks for the patch, I'd need to go through this a bit more in detail.
>
> As far as I remember, the only way to disable reaction is to set it to
> the nop reactor.
> With your patch the behaviour changes and, to disable the reactor, you
> now need to write an empty string, this should be documented somewhere,
> at the very least. Perhaps userspace tools (tools/verification/rv)
> might break and would need adaptation.
>
> We could still remove the kernel side implementation, but from
> userspace (tracefs) we might want to keep the nop reactor available,
> setting it would set the reactor to NULL under the hood.
>
> If you really want to change also the user space interface, we might
> want to imitate other tracefs features and use something like printk /
> !printk to enable/disable a reactor.
>
> What do you think? Did I miss anything here?
You didn't miss anything, I miss that this "nop" interface is inspired by
tracefs.
Although I prefer writing empty string, compared to writing "nop"; it is
better to be consistent with tracefs.
Let me drop this patch.
Best regards,
Nam
Powered by blists - more mailing lists