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: LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Vincent Donnefort <vdonnefort@google.com>
Subject: Re: [PATCH] ring-buffer: Do not trigger WARN_ON() due to a commit_overrun
Date: Wed, 28 May 2025 09:55:20 +0900	[thread overview]
Message-ID: <20250528095520.b4f236a354d9f15d65e7c2fe@kernel.org> (raw)
In-Reply-To: <20250527161130.26276a41@gandalf.local.home>

On Tue, 27 May 2025 16:11:30 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Tue, 27 May 2025 12:11:40 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > But there just happens to be one scenario where this can legitimately
> > happen. That is on a commit_overrun. A commit overrun is when an interrupt
> > preempts an event being written to the buffer and then the interrupt adds
> > so many new events that it fills and wraps the buffer back to the commit.
> > Any new events would then be dropped and be reported as "missed_events".
> 
> I'll probably update the commit log, but the way I triggered this was to run:
> 
>  # perf record -o perf-test.dat -a -- trace-cmd record --nosplice  -e all -p function hackbench 50

Hmm, so this runs 3 commands, hackbench, which is traced by trace-cmd, which
is traced by perf.

> 
> Which causes perf to trigger a bunch of interrupts while trace-cmd enables
> function tracing and all events. This is on a debug kernel that has
> lockdep, KASAN and interrupt and preemption disabling events enabled.

Ah, that is the full-set of the interrupt and tracing :)

Thanks,

> 
> Basically, this causes a lot to be traced in an interrupt. Enough to fill
> 1.4 megs of the tracing buffer with events in interrupts before a single
> event could be recorded.
> 
> I've never triggered this when those extreme conditions were not there.
> 
> -- Steve


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

  reply	other threads:[~2025-05-28  0:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 16:11 [PATCH] ring-buffer: Do not trigger WARN_ON() due to a commit_overrun Steven Rostedt
2025-05-27 20:11 ` Steven Rostedt
2025-05-28  0:55   ` Masami Hiramatsu [this message]
2025-05-28  1:42 ` Masami Hiramatsu
2025-05-28  2:17   ` Steven Rostedt
2025-05-28 15:03     ` Masami Hiramatsu
2025-05-28 15:34       ` Steven Rostedt
2025-05-28 15:48         ` Steven Rostedt

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=20250528095520.b4f236a354d9f15d65e7c2fe@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    --cc=vdonnefort@google.com \
    /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