Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Li Pengfei <ljdlns1987@gmail.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	mark.rutland@arm.com, linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhangbo56@xiaomi.com,
	lipengfei28@xiaomi.com
Subject: Re: [RFC PATCH v4 1/3] trace: add lock-free stackmap for stack trace deduplication
Date: Fri, 21 Aug 2026 23:51:29 -0400	[thread overview]
Message-ID: <20260821235129.078dd489@fedora> (raw)
In-Reply-To: <20260715031245.2571869-1-lipengfei28@xiaomi.com>

On Wed, 15 Jul 2026 11:12:45 +0800
Li Pengfei <ljdlns1987@gmail.com> wrote:

Sorry for the late reply, I haven't had the time to look deeply at this
series.

> 
> One design point I'd like your steer on before respinning: reset
> checks tracer_tracing_is_on() once under trace_types_lock, but
> traceon triggers (ftrace_traceon / traceon_trigger) can re-enable
> tracing without that lock during reset's clear phase. As far as I
> can tell this is a semantic-contract issue, not a memory-safety
> one: the map is protected by the resetting flag (get_id bails with
> -EINVAL and synchronize_rcu() drains in-flight callers), and the
> ring buffer pages aren't freed by reset, so the worst case is a
> non-empty / inconsistent buffer after reset rather than corruption.
> So I'm leaning toward documenting reset as best-effort ("stop
> tracing, including traceon triggers, before reset") rather than
> adding machinery to block the window. Does that match your view, or
> is there a ring-buffer-state hazard I'm missing that would justify
> blocking it explicitly?

Honestly, I don't think we need to be as strict on reset as you are
trying to be. What is the worse thing that happens if a reset happens
while the buffer is not cleared and the trace still exists?

-- Steve

  parent reply	other threads:[~2026-08-22  3:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16  6:41 [RFC PATCH v4 0/3] trace: stack trace deduplication for ftrace ring buffer Li Pengfei
2026-06-16  6:41 ` [RFC PATCH v4 1/3] trace: add lock-free stackmap for stack trace deduplication Li Pengfei
2026-07-14 21:11   ` Steven Rostedt
2026-07-15  3:12     ` Li Pengfei
2026-08-03  2:20       ` Li Pengfei
2026-08-22  3:51       ` Steven Rostedt [this message]
2026-06-16  6:41 ` [RFC PATCH v4 2/3] trace: integrate stackmap into ftrace stack recording path Li Pengfei
2026-07-14 21:53   ` Steven Rostedt
2026-06-16  6:41 ` [RFC PATCH v4 3/3] trace: add documentation, selftest and tooling for stackmap Li Pengfei
2026-07-06  6:31 ` [RFC PATCH v4 0/3] trace: stack trace deduplication for ftrace ring buffer Li Pengfei
2026-07-10 19:14   ` 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=20260821235129.078dd489@fedora \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=lipengfei28@xiaomi.com \
    --cc=ljdlns1987@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=zhangbo56@xiaomi.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