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.17388366710182662849.st...@mhiramat.tok.corp.google.com/ 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(-)
