public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.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: Tue, 31 Mar 2026 10:24:54 +0900	[thread overview]
Message-ID: <20260331102454.b94d304562bab25eb6fef63d@kernel.org> (raw)
In-Reply-To: <20260330162822.54f6bd02@gandalf.local.home>

On Mon, 30 Mar 2026 16:28:22 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> 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");

OK. I'll do this.

Thanks for the comment!

> 
> -- Steve
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2026-03-31  1:24 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
2026-03-31  1:24       ` Masami Hiramatsu [this message]
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=20260331102454.b94d304562bab25eb6fef63d@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --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