Thread (6 messages) 6 messages, 2 authors, 2026-01-20
STALE129d
Revisions (10)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 current
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v10 [diff vs current]

[PATCH v4 0/4] tracing: Remove backup instance after read all

From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Date: 2026-01-20 01:09:22
Also in: lkml

Hi,

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

https://lore.kernel.org/all/176828713313.2161268.62228177827727824.stgit@mhiramat.tok.corp.google.com/ (local)

In this version, I added new fix [1/4] to reset last_boot_info when
the ring buffer is reset. [2/4] is updated to allow resetting the
readonly ring buffer via trace file. And [4/4] is adding a section
for the backup instance to `debugging.rst`.

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, [2/3] makes backup instances readonly (not able to write any
events, cleanup trace, change buffer size). Also, [3/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.

---

Masami Hiramatsu (Google) (4):
      tracing: Reset last_boot_info if ring buffer is reset
      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              |  164 ++++++++++++++++++++++++++++++-------
 kernel/trace/trace.h              |   14 +++
 kernel/trace/trace_boot.c         |    5 +
 kernel/trace/trace_events.c       |   68 +++++++++------
 5 files changed, 212 insertions(+), 58 deletions(-)

--
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help