Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-05 Thread Vincent Donnefort
On Sat, Feb 03, 2024 at 07:33:51PM -0500, Steven Rostedt wrote: > On Mon, 29 Jan 2024 14:27:58 + > Vincent Donnefort wrote: > > > --- /dev/null > > +++ b/include/uapi/linux/trace_mmap.h > > @@ -0,0 +1,43 @@ > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > > +#ifndef _TRAC

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-03 Thread Steven Rostedt
On Tue, 30 Jan 2024 16:22:06 + Vincent Donnefort wrote: > > > +static void rb_update_meta_page(struct ring_buffer_per_cpu *cpu_buffer) > > > +{ > > > + struct trace_buffer_meta *meta = cpu_buffer->meta_page; > > > + > > > + WRITE_ONCE(meta->reader.read, cpu_buffer->reader_page->read); > > > +

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-03 Thread Steven Rostedt
On Mon, 29 Jan 2024 14:27:58 + Vincent Donnefort wrote: > --- /dev/null > +++ b/include/uapi/linux/trace_mmap.h > @@ -0,0 +1,43 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +#ifndef _TRACE_MMAP_H_ > +#define _TRACE_MMAP_H_ > + > +#include > + > +/** > + * struct tra

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-01-30 Thread Vincent Donnefort
On Tue, Jan 30, 2024 at 11:55:10PM +0900, Masami Hiramatsu wrote: > Hi Vincent, > > Thanks for update the code. > > On Mon, 29 Jan 2024 14:27:58 + > Vincent Donnefort wrote: > > > In preparation for allowing the user-space to map a ring-buffer, add > > a set of mapping functions: > > > >

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-01-30 Thread Google
Hi Vincent, Thanks for update the code. On Mon, 29 Jan 2024 14:27:58 + Vincent Donnefort wrote: > In preparation for allowing the user-space to map a ring-buffer, add > a set of mapping functions: > > ring_buffer_{map,unmap}() > ring_buffer_map_fault() > > And controls on the ring-buf

[PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-01-29 Thread Vincent Donnefort
In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() ring_buffer_map_fault() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also involves: A unique I