From: Steven Rostedt <rostedt@goodmis.org>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: mhiramat@kernel.org, linux-trace-kernel@vger.kernel.org,
mathieu.desnoyers@efficios.com, kernel-team@android.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] ring-buffer: Unify ring buffer minimum page calculations
Date: Wed, 9 Sep 2026 18:19:03 -0400 [thread overview]
Message-ID: <20260909181903.403c7fc1@gandalf.local.home> (raw)
In-Reply-To: <20260907192643.42513-3-vdonnefort@google.com>
On Mon, 7 Sep 2026 20:26:43 +0100
Vincent Donnefort <vdonnefort@google.com> 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
prev parent reply other threads:[~2026-09-09 22:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 19:26 [PATCH v1 0/2] ring-buffer: Fix and unify size and " Vincent Donnefort
2026-09-07 19:26 ` [PATCH v1 1/2] tracing/remotes: Account for ring buffer page header in size calculation Vincent Donnefort
2026-09-09 22:13 ` Steven Rostedt
2026-09-11 14:32 ` Vincent Donnefort
2026-09-07 19:26 ` [PATCH v1 2/2] ring-buffer: Unify ring buffer minimum page calculations Vincent Donnefort
2026-09-09 22:19 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260909181903.403c7fc1@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=vdonnefort@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®