Re: [PATCH v13 03/32] ring-buffer: Introduce ring-buffer remotes

2026-03-11 Thread Vincent Donnefort
On Fri, Mar 06, 2026 at 05:37:35PM +0100, Markus Elfring wrote:
> …
> > It is expected from the remote to keep the meta-page updated.
> 
> See also once more:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.0-rc2#n94
> 
> 
> …
> > +++ b/kernel/trace/ring_buffer.c
> …
> > +int ring_buffer_poll_remote(struct trace_buffer *buffer, int cpu)
> > +{
> …
> > +   cpus_read_lock();
> > +
> > +   /*
> > +* Make sure all the ring buffers are up to date before we start reading
> > +* them.
> > +*/
> > +   for_each_buffer_cpu(buffer, cpu) {
> …
> > +   }
> > +
> > +   cpus_read_unlock();
> > +
> > +   return 0;
> > +}
> …
> 
> How do you think about to use another lock guard here?
> https://elixir.bootlin.com/linux/v7.0-rc1/source/include/linux/cpuhplock.h#L48

Sorry, I forgot to reply to you. I had to respin a new version so I have made
the changes you've suggested.

Thanks,
Vincent

> 
> Regards,
> Markus



Re: [PATCH v13 03/32] ring-buffer: Introduce ring-buffer remotes

2026-03-06 Thread Markus Elfring
…
> It is expected from the remote to keep the meta-page updated.

See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.0-rc2#n94


…
> +++ b/kernel/trace/ring_buffer.c
…
> +int ring_buffer_poll_remote(struct trace_buffer *buffer, int cpu)
> +{
…
> + cpus_read_lock();
> +
> + /*
> +  * Make sure all the ring buffers are up to date before we start reading
> +  * them.
> +  */
> + for_each_buffer_cpu(buffer, cpu) {
…
> + }
> +
> + cpus_read_unlock();
> +
> + return 0;
> +}
…

How do you think about to use another lock guard here?
https://elixir.bootlin.com/linux/v7.0-rc1/source/include/linux/cpuhplock.h#L48

Regards,
Markus