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

From
Steven Rostedt <rostedt@goodmis.org>
Date
2026-08-07 14:45:27
Also in
lkml
Reply to
Vincent Donnefort, 2026-08-07
On Fri, 7 Aug 2026 10:43:12 +0100
Vincent Donnefort [off-list ref] wrote:
On Fri, Aug 07, 2026 at 09:14:26AM +0100, Vincent Donnefort wrote:
quoted
On Fri, Aug 07, 2026 at 11:18:08AM +0900, Masami Hiramatsu wrote:  
quoted
On Thu,  6 Aug 2026 22:13:01 +0100
Vincent Donnefort [off-list ref] wrote:
  
quoted
Dynamically resizing a persistent ring buffer is not possible. Disable
the feature.  
Is it true? Of course there is meaningless to resize the persistent
ring buffer (because it makes the buffer none-persistent), we are currently
allows user to resize it (like for resizing unused persistent ring buffer)  
__rb_allocate_pages() in ring_buffer_resize() would call for a persistent buffer
rb_range_buffer(), which IIUC, is just reusing the same ring buffer pages as the
one already in the persistent buffer.  
I have just tried and if reducing the size works, increasing fails in both
rb_set_head_page() and rb_insert_pages() with a warning, which I believe is
expected.

We could improve that, but it feels like it is a lot of work for a meaningless
feature which we should just disable?
Resizing a persistent ring buffer to a smaller size may be allowed, but I
see no point in increasing the size. Making it smaller should allow us to
give back a portion of the persistent ring buffer for general usage.

-- 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