|
|
Log in / Subscribe / Register

ring-buffer: Making persistent ring buffers robust

From:  Steven Rostedt <rostedt-AT-kernel.org>
To:  linux-kernel-AT-vger.kernel.org, linux-trace-kernel-AT-vger.kernel.org
Subject:  [PATCH v20 00/10] ring-buffer: Making persistent ring buffers robust
Date:  Wed, 20 May 2026 14:49:38 -0400
Message-ID:  <20260520184938.749337513@kernel.org>
Cc:  Masami Hiramatsu <mhiramat-AT-kernel.org>, Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>, Catalin Marinas <catalin.marinas-AT-arm.com>, Will Deacon <will-AT-kernel.org>, Ian Rogers <irogers-AT-google.com>
Archive-link:  Article


Here is the 20th version of improvement patches for making persistent
ring buffers robust to failures.
The previous version is here:

 https://lore.kernel.org/all/177751968499.2136606.17388366...

None of the patches from the 19th version was changed. Only patches were
added to it in this version. All of Masami's patches were in version 19,
and all my patches are new to version 20. The reason I'm including
Masami's patches with mine is so that Sashiko can handle all of them
in one go.

I moved patch 1 from v19 to my urgent branch as it was marked as
fix for stable.

The patches I added:

- Fix an invalid sub-buffer in the iterator (added TBD fixes tag)
  I didn't want to fold the patch into the patch that was fixed
  as it was written by Masami.

- Have the dropped buffers be persistent across boots. Masami's patches
  cleared the detection of lost subbuffers on boot up and the next
  boot would not show them. If the persistent ring buffer isn't cleared
  it should report the same info on subsequent boots.

- Show [LOST EVENTS] in persistent trace file where a subbuffer was
  reset due to being invalid.

- Show [LOST EVENTS] in the persistent trace_pipe file as well.

Masami Hiramatsu (Google) (6):
      ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer
      ring-buffer: Skip invalid sub-buffers when rewinding persistent ring buffer
      ring-buffer: Add persistent ring buffer invalid-page inject test
      ring-buffer: Show commit numbers in buffer_meta file
      ring-buffer: Cleanup persistent ring buffer validation
      ring-buffer: Cleanup buffer_data_page related code

Steven Rostedt (4):
      ring-buffer: Skip invalid sub-buffers for iterator
      ring-buffer: Have dropped subbuffers be persistent across reboots
      ring-buffer: Show persistent buffer dropped events in trace file
      ring-buffer: Show persistent buffer dropped events in trace_pipe file

----
 include/linux/ring_buffer.h |   1 +
 kernel/trace/Kconfig        |  34 +++
 kernel/trace/ring_buffer.c  | 538 +++++++++++++++++++++++++++++---------------
 kernel/trace/trace.c        |   4 +
 4 files changed, 397 insertions(+), 180 deletions(-)



Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds