public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/3] tracing: Remove backup instance after read all
@ 2026-03-31 16:32 Masami Hiramatsu (Google)
  2026-03-31 16:32 ` [PATCH v9 1/3] tracing: Make the backup instance non-reusable Masami Hiramatsu (Google)
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-03-31 16:32 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
	linux-trace-kernel

Hi,

Here is the v9 of the series to improve backup instances of
the persistent ring buffer. The previous version is here:

https://lore.kernel.org/all/177071300558.2293046.12057922262682243630.stgit@mhiramat.tok.corp.google.com/

In this version, I removed bugfixes (those are actual fixes/minor
updates) and the force permission check in tracefs
because superuser can modify the permission by itself. Instead,
simply add read-only and FMODE_WRITE check in the related open()
file operations[1/3]. Also, I fixed 2 bugs in autoremove patch
to init dedicated workqueue correctly [2/3].

Series Description
------------------
Since backup instances are a kind of snapshot of the persistent
ring buffer, it should be readonly. And if it is readonly
there is no reason to keep it after reading all data via trace_pipe
because the data has been consumed. But user should be able to remove
the readonly instance by rmdir or truncating `trace` file.

Thus, [1/3] makes backup instances readonly (not able to write any
events, cleanup trace, change buffer size). Also, [2/3] removes the
backup instance after consuming all data via trace_pipe.
With this improvements, even if we makes a backup instance (using
the same amount of memory of the persistent ring buffer), it will
be removed after reading the data automatically.

Thanks,

---

Masami Hiramatsu (Google) (3):
      tracing: Make the backup instance non-reusable
      tracing: Remove the backup instance automatically after read
      tracing/Documentation: Add a section about backup instance


 Documentation/trace/debugging.rst |   19 ++++
 kernel/trace/trace.c              |  166 +++++++++++++++++++++++++++++--------
 kernel/trace/trace.h              |   13 +++
 kernel/trace/trace_boot.c         |    5 +
 kernel/trace/trace_events.c       |   76 ++++++++++-------
 5 files changed, 208 insertions(+), 71 deletions(-)

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-02 14:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 16:32 [PATCH v9 0/3] tracing: Remove backup instance after read all Masami Hiramatsu (Google)
2026-03-31 16:32 ` [PATCH v9 1/3] tracing: Make the backup instance non-reusable Masami Hiramatsu (Google)
2026-03-31 16:32 ` [PATCH v9 2/3] tracing: Remove the backup instance automatically after read Masami Hiramatsu (Google)
2026-03-31 21:19   ` Steven Rostedt
2026-04-01  3:19     ` Masami Hiramatsu
2026-04-01 14:40       ` Steven Rostedt
2026-04-02 13:19         ` Masami Hiramatsu
2026-04-02 14:52           ` Steven Rostedt
2026-03-31 16:32 ` [PATCH v9 3/3] tracing/Documentation: Add a section about backup instance Masami Hiramatsu (Google)
2026-03-31 21:21   ` Steven Rostedt
2026-04-01  3:15     ` Masami Hiramatsu
2026-04-01 14:41       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox