mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Donnefort <vdonnefort@google.com>
To: rostedt@goodmis.org, mhiramat@kernel.org,
	 linux-trace-kernel@vger.kernel.org
Cc: mathieu.desnoyers@efficios.com, kernel-team@android.com,
	 linux-kernel@vger.kernel.org,
	Vincent Donnefort <vdonnefort@google.com>
Subject: [PATCH v2 0/3] ring-buffer: Fix and unify size and page calculations
Date: Fri, 11 Sep 2026 20:39:34 +0100	[thread overview]
Message-ID: <20260911193937.602202-1-vdonnefort@google.com> (raw)

This short series unifies minimum page calculation for ring buffers and
fix a small issue with the number of pages calculation for trace
remotes.

v2:
  - Add a helper in "Account for ring buffer page header in size
    calculation" (Steven)
  - Split the nr_pages overflow handling into its own patch (Steven)
  - Rename the helpers into __calc_nr_pages_ring_buffer_desc() and
    rb_calculate_nr_pages() (Steven)
  - Use RING_BUFFER_MIN_NR_PAGES in trace_rb_cpu_prepare() (Sashiko)

v1: https://lore.kernel.org/all/20260907192643.42513-1-vdonnefort@google.com

Vincent Donnefort (3):
  tracing/remotes: Account for ring buffer page header in size
    calculation
  tracing/remotes: Catch nr_page_va overflow in ring_buffer_desc sizing
  ring-buffer: Unify ring buffer minimum page calculations

 include/linux/ring_buffer.h       | 26 +++++++++++++++++++++++--
 kernel/trace/ring_buffer.c        | 32 +++++++++++++------------------
 kernel/trace/simple_ring_buffer.c |  4 ++--
 kernel/trace/trace_remote.c       |  6 +++++-
 4 files changed, 44 insertions(+), 24 deletions(-)


base-commit: df2908090cda368b01ff43709f51890076c56157
-- 
2.55.0.1007.g17ff1f9808-goog


             reply	other threads:[~2026-09-11 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 19:39 Vincent Donnefort [this message]
2026-09-11 19:39 ` [PATCH v2 1/3] tracing/remotes: Account for ring buffer page header in size calculation Vincent Donnefort
2026-09-11 19:39 ` [PATCH v2 2/3] tracing/remotes: Catch nr_page_va overflow in ring_buffer_desc sizing Vincent Donnefort
2026-09-11 19:39 ` [PATCH v2 3/3] ring-buffer: Unify ring buffer minimum page calculations Vincent Donnefort

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=20260911193937.602202-1-vdonnefort@google.com \
    --to=vdonnefort@google.com \
    --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=rostedt@goodmis.org \
    /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®