diff options
author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-06-04 09:10:21 +0900 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2025-07-09 20:38:42 -0400 |
commit | ca296d32ece38b07113bad64e08add75073a0e2b (patch) | |
tree | ee38b22d3a8b4d20a5b60a4c71350c9de5d74e94 /scripts/lib/kdoc/kdoc_parser.py | |
parent | d7b8f8e20813f0179d8ef519541a3527e7661d3a (diff) |
tracing: ring_buffer: Rewind persistent ring buffer on reboot
Rewind persistent ring buffer pages which have been read in the previous
boot. Those pages are highly possible to be lost before writing it to the
disk if the previous kernel crashed. In this case, the trace data is kept
on the persistent ring buffer, but it can not be read because its commit
size has been reset after read. This skips clearing the commit size of
each sub-buffer and recover it after reboot.
Note: If you read the previous boot data via trace_pipe, that is not
accessible in that time. But reboot without clearing (or reusing) the read
data, the read data is recovered again in the next boot.
Thus, when you read the previous boot data, clear it by `echo > trace`.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/174899582116.955054.773265393511190051.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions