Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 21:39:37 -0400 Steven Rostedt wrote: > > > > Maybe explain why sometimes __rb_inc_dec_mapped() is called to > > increment or decrement ->mapped, and sometimes it id done directly ? > > I can see that the function also acquires the buffer mutex, which > > isn't needed at the p

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 16:53:43 -0700 Guenter Roeck wrote: > >>> @@ -6403,7 +6407,8 @@ int ring_buffer_unmap(struct trace_buffer *buffer, > >>> int cpu) > >>> mutex_lock(&buffer->mutex); > >>> raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags); > >>> > >>> - cpu_buffer->

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Guenter Roeck
On 6/11/24 15:53, Steven Rostedt wrote: On Tue, 11 Jun 2024 15:43:59 -0700 Guenter Roeck wrote: On 6/11/24 12:28, Steven Rostedt wrote: From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user spa

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 15:43:59 -0700 Guenter Roeck wrote: > On 6/11/24 12:28, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > In preparation for having the ring buffer mapped to a dedicated location, > > which will have the same restrictions as user space memory mapped buffers,

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Guenter Roeck
On 6/11/24 12:28, Steven Rostedt wrote: From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure wi

[PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure without having the user space meta page mapp