From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Ian Rogers <irogers@google.com>
Subject: Re: [PATCH v14 2/5] ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer
Date: Mon, 30 Mar 2026 16:28:22 -0400 [thread overview]
Message-ID: <20260330162822.54f6bd02@gandalf.local.home> (raw)
In-Reply-To: <20260330162210.5e37b0c3@gandalf.local.home>
On Mon, 30 Mar 2026 16:22:10 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 30 Mar 2026 21:50:04 +0900
> "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
>
> > @@ -2042,7 +2065,8 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
> > local_set(&cpu_buffer->entries, entries);
> > local_set(&cpu_buffer->entries_bytes, entry_bytes);
> >
> > - pr_info("Ring buffer meta [%d] is from previous boot!\n", cpu_buffer->cpu);
> > + pr_info("Ring buffer meta [%d] is from previous boot! (%d pages discarded)\n",
> > + cpu_buffer->cpu, discarded);
>
> As pages should never be discarded unless something went wrong, let's only
> print that if there were discarded pages.
>
> if (discarded) {
> pr_info("Ring buffer meta [%d] is from previous boot! (%d pages discarded)\n",
> cpu_buffer->cpu, discarded);
> } else {
> pr_info("Ring buffer meta [%d] is from previous boot!\n", cpu_buffer->cpu);
> }
Or perhaps:
pr_info("Ring buffer meta [%d] is from previous boot!", cpu_buffer->cpu);
if (discarded)
pr_cont(" (%d pages discarded)", discarded);
pr_cont("\n");
-- Steve
next prev parent reply other threads:[~2026-03-30 20:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 12:49 [PATCH v14 0/5] ring-buffer: Making persistent ring buffers robust Masami Hiramatsu (Google)
2026-03-30 12:49 ` [PATCH v14 1/5] ring-buffer: Flush and stop persistent ring buffer on panic Masami Hiramatsu (Google)
2026-03-30 17:54 ` Steven Rostedt
2026-03-31 0:29 ` Masami Hiramatsu
2026-03-30 12:50 ` [PATCH v14 2/5] ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer Masami Hiramatsu (Google)
2026-03-30 20:22 ` Steven Rostedt
2026-03-30 20:28 ` Steven Rostedt [this message]
2026-03-31 1:24 ` Masami Hiramatsu
2026-03-30 12:50 ` [PATCH v14 3/5] ring-buffer: Skip invalid sub-buffers when rewinding " Masami Hiramatsu (Google)
2026-03-30 12:50 ` [PATCH v14 4/5] ring-buffer: Reset RB_MISSED_* flags on " Masami Hiramatsu (Google)
2026-03-30 18:36 ` Steven Rostedt
2026-03-31 1:43 ` Masami Hiramatsu
2026-03-30 12:50 ` [PATCH v14 5/5] ring-buffer: Add persistent ring buffer selftest Masami Hiramatsu (Google)
2026-03-30 20:24 ` Steven Rostedt
2026-03-31 4:12 ` 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=20260330162822.54f6bd02@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@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