Linux Documentation
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Wei Li <liwei1412@hotmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Nam Cao <namcao@linutronix.de>
Cc: linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	 liwei391@huawei.com
Subject: Re: [PATCH 1/6] rv: Mark diverged child reactors with a star
Date: Mon, 23 Nov 2026 09:03:20 +0100	[thread overview]
Message-ID: <7715326a01e3cd906829bde394663d449241f17e.camel@redhat.com> (raw)
In-Reply-To: <CY8PR19MB700998CE5DB06F45985926E8B7682@CY8PR19MB7009.namprd19.prod.outlook.com>

On Wed, 2026-11-04 at 17:21 +0800, Wei Li wrote:
> From: Wei Li <liwei391@huawei.com>
> 
> Each nested monitor carries its own reactor pointer. Writing a reactor
> to a single nested monitor leaves the container view unchanged. The user
> cannot see the divergence.
> 
> Print a "*" after the selected reactor of a container when a nested
> monitor uses a different one.
> 
> Signed-off-by: Wei Li <liwei391@huawei.com>
> ---

This type of notation is new right?
It's a fine addition, but I wonder if the reactor in a container monitor when
"dirty" means anything: for all we know, all nested monitors could have a
different reactor.

Wouldn't it be clearer to use something like a new line with [mixed] (or any
other notation already used elsewhere)?

Thanks,
Gabriele

>  kernel/trace/rv/rv_reactors.c | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/rv/rv_reactors.c b/kernel/trace/rv/rv_reactors.c
> index 8e57a95d446b..ea52f50e6453 100644
> --- a/kernel/trace/rv/rv_reactors.c
> +++ b/kernel/trace/rv/rv_reactors.c
> @@ -134,6 +134,21 @@ static const struct file_operations
> available_reactors_ops = {
>  	.release = seq_release
>  };
>  
> +static bool monitor_reactor_is_dirty(struct rv_monitor *mon)
> +{
> +	struct rv_monitor *p = mon;
> +
> +	if (rv_is_container_monitor(mon))
> +		list_for_each_entry_continue(p, &rv_monitors_list, list) {
> +			if (p->parent != mon)
> +				break;
> +			if (p->reactor != mon->reactor)
> +				return true;
> +		}
> +
> +	return false;
> +}
> +
>  /*
>   * Monitor's reactor file.
>   */
> @@ -143,7 +158,10 @@ static int monitor_reactor_show(struct seq_file *m, void
> *p)
>  	struct rv_reactor *reactor = container_of(p, struct rv_reactor,
> list);
>  
>  	if (mon->reactor == reactor)
> -		seq_printf(m, "[%s]\n", reactor->name);
> +		if (monitor_reactor_is_dirty(mon))
> +			seq_printf(m, "[%s]*\n", reactor->name);
> +		else
> +			seq_printf(m, "[%s]\n", reactor->name);
>  	else
>  		seq_printf(m, "%s\n", reactor->name);
>  	return 0;


  reply	other threads:[~2026-11-23  8:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  9:21 [PATCH 0/6] rv: Expose and preserve nested monitor states Wei Li
2026-11-04  9:21 ` [PATCH 1/6] rv: Mark diverged child reactors with a star Wei Li
2026-11-23  8:03   ` Gabriele Monaco [this message]
2026-11-04  9:21 ` [PATCH 2/6] rv: Update monitors through a quiesce helper Wei Li
2026-11-04  9:21 ` [PATCH 3/6] rv: Show the mixed enable state of containers Wei Li
2026-11-21 14:43   ` Gabriele Monaco
2026-11-04  9:21 ` [PATCH 4/6] Documentation/rv: Document the enable and reactor states Wei Li
2026-11-04  9:21 ` [PATCH 5/6] tools/rv: Parse the mixed enable state of containers Wei Li
2026-11-04  9:21 ` [PATCH 6/6] rv: Do not send the trailing NUL to userspace Wei Li

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=7715326a01e3cd906829bde394663d449241f17e.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=liwei1412@hotmail.com \
    --cc=liwei391@huawei.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.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