Re: [PATCH 1/6] ring-buffer: Prevent resizing of persistent ring buffer

From
Steven Rostedt <rostedt@goodmis.org>
Date
2026-08-07 19:26:43
Also in
lkml
Reply to
Vincent Donnefort, 2026-08-07
On Fri, 7 Aug 2026 16:45:23 +0100
Vincent Donnefort [off-list ref] wrote:
free_reserved_page() would do actually. But then it is definitive. 
It's not always a reserved page.
Happy to implement something like that. That also means that the instance can be
actually freed?
They can be freed now. Try a rmdir on one.

Note implementing this is not straight forward. What I would suggest is
that because the persistent ring buffers are contiguous, to resize, you
basically need to remap to the new size. That means each of the buffers
will still be attached to each other.

What would need to be done is:

  1. calculate the new size needed to accommodate all the CPU buffers.
  2. Split them up within the new size region.
  3. Then free the remaining pages.

Obviously, access to the buffer from readers and writers will need to be
prohibited while this is happening.

-- Steve
Thread (22 messages) 22 messages, 3 authors, last reply 2026-08-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help