[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250729152459.062d15b3@batman.local.home>
Date: Tue, 29 Jul 2025 15:24:59 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Colin Ian King <colin.i.king@...il.com>
Subject: [GIT PULL] ring-buffer: Updates for v6.17
Linus,
ring-buffer changes for v6.17:
- Rewind persistent ring buffer on boot
When the persistent ring buffer is being used for live kernel tracing and
the system crashes, the tool that is reading the trace may not have recorded
the data when the system crashed. Although the persistent ring buffer still
has that data, when reading it after a reboot, it will start where it left
off. That is, what was read will not be accessible.
Instead, on reboot, have the persistent ring buffer restart where the data
starts and this will allow the tooling to recover what was lost when the
crash occurred.
- Remove the ring_buffer_read_prepare_sync() logic
Reading the trace file required stopping writing to the ring buffer as the
trace file is only an iterator and does not consume what it read. It was
originally not safe to read the ring buffer in this mode and required
disabling writing. The ring_buffer_read_prepare_sync() logic was used to
stop each per_cpu ring buffer, call synchronize_rcu() and then start the
iterator. This was used instead of calling synchronize_rcu() for each
per_cpu buffer.
Today, the iterator has been updated where it is safe to read the trace file
while writing to the ring buffer is still occurring. There is no more need
to do this synchronization and it is causing large delays on machines with
many CPUs. Remove this unneeded synchronization.
- Make static string array a constant in show_irq_str()
Making the string array into a constant has shown to decrease code text/data
size.
Please pull the latest trace-ringbuffer-v6.17 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-ringbuffer-v6.17
Tag SHA1: 9969b67120a3c22ea35c93dc8f2f81dce5143a38
Head SHA1: 6443cdf567a900e03afe1d66fb8bcc7dad0835d0
Colin Ian King (1):
ring-buffer: Make the const read-only 'type' static
Masami Hiramatsu (Google) (1):
tracing: ring_buffer: Rewind persistent ring buffer on reboot
Steven Rostedt (1):
ring-buffer: Remove ring_buffer_read_prepare_sync()
----
include/linux/ring_buffer.h | 4 +-
kernel/trace/ring_buffer.c | 168 +++++++++++++++++++++++++++++---------------
kernel/trace/trace.c | 14 ++--
kernel/trace/trace_kdb.c | 8 +--
4 files changed, 119 insertions(+), 75 deletions(-)
---------------------------
Powered by blists - more mailing lists