Thread (8 messages) 8 messages, 3 authors, 16d ago

Re: [PATCH v1 2/2] ring-buffer: Unify ring buffer minimum page calculations

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-09-09 22:17:49
Also in: lkml

On Mon,  7 Sep 2026 20:26:43 +0100
Vincent Donnefort [off-list ref] wrote:
The codebase scatters hardcoded minimum page limits across multiple
places. Introduce RING_BUFFER_MIN_NR_PAGES and rb_size_to_nr_pages() to
formalize the requirement of two pages in a ring buffer.
Now I read this after I replied to patch 1 :-)

Anyway, I like my calculate_nr_pages() better than rb_size_to_nr_pages()
but I'm not really picky ;-)

I would make the helper function part of the first patch as you introduce
the duplication of the code there. Whenever I introduce a duplicate code, I
will usually do it by creating a helper function and using that function in
the places of the duplication instead of making it into two steps.

The use of the MIN_NR_PAGES macro can stay as a separate patch.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help