Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-11 Thread Vincent Donnefort
[...] > > > + */ > > > + smp_wmb(); > > > + WRITE_ONCE(cpu_buffer->mapped, 1); > > > + > > > + /* Init meta_page values unless the writer did it already */ > > > + cmpxchg(&cpu_buffer->meta_page->entries, 0, > > > + local_read(&cpu_buffer->entries)); > > > + cmpxchg(&cpu_buffer->meta_page

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-11 Thread Vincent Donnefort
On Tue, Jan 09, 2024 at 06:58:13PM -0500, Steven Rostedt wrote: > On Wed, 10 Jan 2024 08:42:05 +0900 > Masami Hiramatsu (Google) wrote: > > > On Tue, 9 Jan 2024 15:13:51 + > > Vincent Donnefort wrote: > > > > > > > @@ -388,6 +389,7 @@ struct rb_irq_work { > > > > > bool

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-09 Thread Steven Rostedt
On Wed, 10 Jan 2024 08:42:05 +0900 Masami Hiramatsu (Google) wrote: > On Tue, 9 Jan 2024 15:13:51 + > Vincent Donnefort wrote: > > > > > @@ -388,6 +389,7 @@ struct rb_irq_work { > > > > boolwaiters_pending; > > > > bool

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-09 Thread Google
On Tue, 9 Jan 2024 15:13:51 + Vincent Donnefort wrote: > > > @@ -388,6 +389,7 @@ struct rb_irq_work { > > > boolwaiters_pending; > > > boolfull_waiters_pending; > > > boolwakeup_full; > > > + bool

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-09 Thread Steven Rostedt
On Tue, 9 Jan 2024 15:13:51 + Vincent Donnefort wrote: > > > @@ -388,6 +389,7 @@ struct rb_irq_work { > > > boolwaiters_pending; > > > boolfull_waiters_pending; > > > boolwakeup_full; > > > + bool

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-09 Thread Vincent Donnefort
On Tue, Jan 09, 2024 at 11:42:30PM +0900, Masami Hiramatsu wrote: > On Fri, 5 Jan 2024 09:47:28 + > 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_f

Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-09 Thread Google
On Fri, 5 Jan 2024 09:47:28 + 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-buffer: > > ring_buffer_map_get_reader()

[PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping functions

2024-01-05 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