tracing: Handle ring buffer waiters
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ring-buffer: Have the shortest_full queue be the shortest not longestkernel/ | +1 | 0 replies | |
| 2/5 | ring-buffer: Check pending waiters when doing wake ups as wellkernel/ | +2 | 0 replies | |
| 3/5 | ring-buffer: Add ring_buffer_wake_waiters()include/ kernel/ | +35 | 0 replies | |
| 4/5 | tracing: Wake up ring buffer waiters on closing of the fileinclude/ kernel/ | +16 | 0 replies | |
| 5/5 | tracing: Add ioctl() to force ring buffer waiters to wake upkernel/ | +18 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] tracing: Handle ring buffer waiters
While working on libtracefs functions that allow for reading the raw trace files, I found that my test programs would get stuck waiting on the buffer when they should stop. Signals work fine, but closing the file would not break them out of the wait.
I found this confusing and the reading functions would lose a lot of data. This fixes the wake up issue, which should have always been the case. I also added an ioctl() to the trace_pipe_raw that will wake up all waiters on any ioctl.
Steven Rostedt (Google) (5):
ring-buffer: Have the shortest_full queue be the shortest not longest
ring-buffer: Check pending waiters when doing wake ups as well
ring-buffer: Add ring_buffer_wake_waiters()
tracing: Wake up ring buffer waiters on closing of the file
tracing: Add ioctl() to force ring buffer waiters to wake up
----
include/linux/ring_buffer.h | 2 +- include/linux/trace_events.h | 1 + kernel/trace/ring_buffer.c | 39 +++++++++++++++++++++++++++++++++++++-- kernel/trace/trace.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 3 deletions(-)