mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jaewon Jung <jaewon8868@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Keep copying markers when one instance is stopped
Date: Mon, 2 Nov 2026 09:17:51 -0500	[thread overview]
Message-ID: <20261102091751.2ee7c4d3@gandalf.local.home> (raw)
In-Reply-To: <20261031073549.2991066-1-jaewon8868@gmail.com>

On Sat, 31 Oct 2026 16:35:45 +0900
Jaewon Jung <jaewon8868@gmail.com> wrote:

> When several instances enable copy_trace_marker, stopping one instance
> can prevent the remaining buffers from receiving markers.
> 
> Continue copying text and raw markers even if one copy fails, and
> return the last error after trying all buffers.
> 
> Fixes: 7b382efd5e8a ("tracing: Allow the top level trace_marker to write into another instances")
> Cc: stable@vger.kernel.org

Please remove the stable tag, this is more of an enhancement than a bug fix.
You can keep the fixes tag though.

> Signed-off-by: Jaewon Jung <jaewon8868@gmail.com>
> ---
> The current code stops at the first error without trying the remaining
> buffers. This patch tries all buffers even if a write fails, and returns
> the last error.
> 
> Returning either the first or last error cannot report all failures.
> I chose the last error to keep the code simple. Per-buffer error
> reporting is outside the scope of this patch.
> 
> Please let me know if you prefer a different error return policy.
> 
> Tested on x86_64 QEMU:
> - Setup: Enable copy_trace_marker in multiple instances and set
>   tracing_on=0 in one instance before a live buffer in the copy order.
> - Before: No markers in live buffers after the stopped instance;
>   write() returns an error.
> - After: Markers in all live buffers; write() returns an error.
> - Existing text/raw marker and instance selftests: 6 PASS.

Honestly, just skip the warnings of the copies and don't even bother
returning its value.

-- Steve

      reply	other threads:[~2026-11-02 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31  7:35 Jaewon Jung
2026-11-02 14:17 ` Steven Rostedt [this message]

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=20261102091751.2ee7c4d3@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jaewon8868@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=stable@vger.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

all inboxes | Powered by JetHome®