Hi, Here is the 3rd version of the series to improve backup instances of the persistent ring buffer. The previous version is here:
https://lore.kernel.org/all/176788217131.1398317.11144318616426272901.st...@mhiramat.tok.corp.google.com/ In this version, I updated [1/2] to back to checking readonly flag and consolidate the eventfs_entries. 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. Thus, [1/2] makes backup instances readonly (not able to write any events, cleanup trace, change buffer size). Also, [2/2] 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) (2): tracing: Make the backup instance readonly tracing: Add autoremove feature to the backup instance kernel/trace/trace.c | 164 +++++++++++++++++++++++++++++++++++-------- kernel/trace/trace.h | 14 +++- kernel/trace/trace_boot.c | 5 + kernel/trace/trace_events.c | 68 +++++++++++------- 4 files changed, 191 insertions(+), 60 deletions(-) -- Masami Hiramatsu (Google) <[email protected]>
