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, bgrzesik@google.com,
Vincent Donnefort <vdonnefort@google.com>
Subject: [PATCH v1 4/4] ring-buffer: Increment pages_read on remote ring buffer page swap
Date: Fri, 13 Nov 2026 15:27:13 +0000 [thread overview]
Message-ID: <20261113152729.837429-5-vdonnefort@google.com> (raw)
In-Reply-To: <20261113152729.837429-1-vdonnefort@google.com>
__rb_get_reader_page_from_remote() swaps in a new reader page without
incrementing cpu_buffer->pages_read. While this isn't an issue now as
trace remotes do not use buffer_percent, add this missing increment for
consistency.
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
---
kernel/trace/ring_buffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 6016d16d1566..ae33e64c7daa 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -5881,6 +5881,7 @@ __rb_get_reader_page_from_remote(struct ring_buffer_per_cpu *cpu_buffer)
cpu_buffer->reader_page->read = 0;
cpu_buffer->pages = &new_head->list;
cpu_buffer->lost_events = cpu_buffer->meta_page->reader.lost_events;
+ local_inc(&cpu_buffer->pages_read);
if (!rb_page_size(cpu_buffer->reader_page))
return NULL;
--
2.56.0.611.g1030f0b940-goog
prev parent reply other threads:[~2026-11-13 15:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 15:27 [PATCH v1 0/4] ring-buffer: Fix remote reader page swap and memory ordering Vincent Donnefort
2026-11-13 15:27 ` [PATCH v1 1/4] ring-buffer: Skip remote reader page swap when on tail Vincent Donnefort
2026-11-13 15:27 ` [PATCH v1 2/4] ring-buffer: Check remote reader page commit before meta entries Vincent Donnefort
2026-11-13 16:03 ` sashiko-bot
2026-11-13 15:27 ` [PATCH v1 3/4] ring-buffer: Order remote page commit with data and timestamp Vincent Donnefort
2026-11-13 15:34 ` sashiko-bot
2026-11-13 15:27 ` Vincent Donnefort [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=20261113152729.837429-5-vdonnefort@google.com \
--to=vdonnefort@google.com \
--cc=bgrzesik@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