From: Vincent Donnefort <vdonnefort@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: sashiko-bot@kernel.org, sashiko-reviews@lists.linux.dev,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/3] tracing: Fix subbuf resize races with trace_pipe_raw readers
Date: Tue, 25 Aug 2026 13:52:11 +0100 [thread overview]
Message-ID: <ao2P-4a2aJFYVT6k@google.com> (raw)
In-Reply-To: <20260825084707.4c9cf9f5@gandalf.local.home>
On Tue, Aug 25, 2026 at 08:47:07AM -0400, Steven Rostedt wrote:
> On Tue, 25 Aug 2026 09:26:07 +0100
> Vincent Donnefort <vdonnefort@google.com> wrote:
>
> >
> > Do you think it is still worth to reduce the window of discrepency between
> > buffer->subbuf_order and buffer_page->order?
>
> Can you elaborate more on what you mean?
>
> -- Steve
Something like this.
@@ -7469,8 +7473,6 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
/* Make sure all commits have finished */
synchronize_rcu();
- buffer->subbuf_order = order;
-
/* Make sure all new buffers are allocated, before deleting the old ones */
for_each_buffer_cpu(buffer, cpu) {
@@ -7500,6 +7502,7 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
/* Allocate the new size buffer */
INIT_LIST_HEAD(&cpu_buffer->new_pages);
if (__rb_allocate_pages(cpu_buffer, nr_pages,
+ order,
&cpu_buffer->new_pages)) {
/* not enough memory for new pages */
err = -ENOMEM;
@@ -7507,6 +7510,8 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
}
}
+ buffer->subbuf_order = order;
+
for_each_buffer_cpu(buffer, cpu) {
struct buffer_data_read_page old_free_data_page;
struct list_head old_pages;
But now with the idea of copying the data when data_page->order !=
reader_page->order, I am less convinced there's any gain.
--
Vincent
next prev parent reply other threads:[~2026-08-25 12:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 13:47 [PATCH v7 0/3] ring-buffer: Fixes for subbuf resizing and persistent buffers Vincent Donnefort
2026-08-17 13:47 ` [PATCH v7 1/3] tracing: Fix subbuf resize races with trace_pipe_raw readers Vincent Donnefort
2026-08-17 14:08 ` sashiko-bot
2026-08-22 15:04 ` Steven Rostedt
2026-08-23 20:09 ` Vincent Donnefort
2026-08-24 14:53 ` Steven Rostedt
2026-08-25 8:26 ` Vincent Donnefort
2026-08-25 12:47 ` Steven Rostedt
2026-08-25 12:52 ` Vincent Donnefort [this message]
2026-08-25 14:25 ` Steven Rostedt
2026-08-17 13:47 ` [PATCH v7 2/3] ring-buffer: Cap static ring buffer nr_pages Vincent Donnefort
2026-08-17 14:03 ` sashiko-bot
2026-08-17 13:47 ` [PATCH v7 3/3] ring-buffer: Prevent truncation of nr_pages / nr_subbufs Vincent Donnefort
2026-08-17 13:59 ` sashiko-bot
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=ao2P-4a2aJFYVT6k@google.com \
--to=vdonnefort@google.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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