From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Ian Rogers <irogers@google.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v18 7/8] ring-buffer: Cleanup persistent ring buffer validation
Date: Tue, 28 Apr 2026 16:24:57 -0400 [thread overview]
Message-ID: <20260428162457.1ca8c4b6@gandalf.local.home> (raw)
In-Reply-To: <177701357903.2223789.1327164275262010250.stgit@mhiramat.tok.corp.google.com>
On Fri, 24 Apr 2026 15:52:59 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Cleanup rb_meta_validate_events() function to make it easier to read.
> This includes the following cleanups:
> - Introduce rb_validatation_state to hold working variables in
> validation.
> - Move repleated validation state updates into rb_validate_buffer().
> - Move reader_page injection code outside of rb_meta_validate_events().
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> kernel/trace/ring_buffer.c | 186 ++++++++++++++++++++++----------------------
> 1 file changed, 95 insertions(+), 91 deletions(-)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index de653a8e3cec..9850a0d8d24b 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -1883,8 +1883,16 @@ static int rb_read_data_buffer(struct buffer_data_page *dpage, int tail, int cpu
> return events;
> }
>
> -static int rb_validate_buffer(struct buffer_page *bpage, int cpu,
> - struct ring_buffer_cpu_meta *meta, u64 prev_ts, u64 next_ts)
> +struct rb_validation_state {
> + unsigned long entries;
> + unsigned long entry_bytes;
> + int discarded;
> + u64 ts;
> +};
> +
> +static int __rb_validate_buffer(struct buffer_page *bpage, int cpu,
> + struct ring_buffer_cpu_meta *meta,
> + u64 prev_ts, u64 next_ts)
> {
This can still use those comments (from patch 4).
Also, could you rebase on top of v7.1-rc1?
Thanks Masami!
-- Steve
> struct buffer_data_page *dpage = bpage->page;
> unsigned long long ts;
> @@ -1914,16 +1922,82 @@ static int rb_validate_buffer(struct buffer_page *bpage, int cpu,
> return ret;
> }
next prev parent reply other threads:[~2026-04-28 20:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 6:51 [PATCH v18 0/8] ring-buffer: Making persistent ring buffers robust Masami Hiramatsu (Google)
2026-04-24 6:52 ` [PATCH v18 1/8] ring-buffer: Do not double count the reader_page Masami Hiramatsu (Google)
2026-04-24 6:52 ` [PATCH v18 2/8] ring-buffer: Flush and stop persistent ring buffer on panic Masami Hiramatsu (Google)
2026-04-24 6:52 ` [PATCH v18 3/8] ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer Masami Hiramatsu (Google)
2026-04-28 19:55 ` Steven Rostedt
2026-04-29 15:15 ` Masami Hiramatsu
2026-04-29 16:32 ` Steven Rostedt
2026-04-24 6:52 ` [PATCH v18 4/8] ring-buffer: Skip invalid sub-buffers when rewinding " Masami Hiramatsu (Google)
2026-04-28 20:21 ` Steven Rostedt
2026-04-29 15:20 ` Masami Hiramatsu
2026-04-29 16:39 ` Steven Rostedt
2026-04-24 6:52 ` [PATCH v18 5/8] ring-buffer: Add persistent ring buffer invalid-page inject test Masami Hiramatsu (Google)
2026-04-24 6:52 ` [PATCH v18 6/8] ring-buffer: Show commit numbers in buffer_meta file Masami Hiramatsu (Google)
2026-04-24 6:52 ` [PATCH v18 7/8] ring-buffer: Cleanup persistent ring buffer validation Masami Hiramatsu (Google)
2026-04-28 20:24 ` Steven Rostedt [this message]
2026-04-29 15:21 ` Masami Hiramatsu
2026-04-29 15:50 ` Steven Rostedt
2026-04-24 6:53 ` [PATCH v18 8/8] ring-buffer: Cleanup buffer_data_page related code Masami Hiramatsu (Google)
2026-04-24 7:06 ` [PATCH v18 0/8] ring-buffer: Making persistent ring buffers robust Masami Hiramatsu
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=20260428162457.1ca8c4b6@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=catalin.marinas@arm.com \
--cc=irogers@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=will@kernel.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