Skip to content

Commit 3e46d91

Browse files
shijujose4rostedt
authored andcommitted
tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw
poll() and select() on per_cpu trace_pipe and trace_pipe_raw do not work since kernel 6.1-rc6. This issue is seen after the commit 42fb0a1 ("tracing/ring-buffer: Have polling block on watermark"). This issue is firstly detected and reported, when testing the CXL error events in the rasdaemon and also erified using the test application for poll() and select(). This issue occurs for the per_cpu case, when calling the ring_buffer_poll_wait(), in kernel/trace/ring_buffer.c, with the buffer_percent > 0 and then wait until the percentage of pages are available. The default value set for the buffer_percent is 50 in the kernel/trace/trace.c. As a fix, allow userspace application could set buffer_percent as 0 through the buffer_percent_fops, so that the task will wake up as soon as data is added to any of the specific cpu buffer. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: [email protected] Fixes: 42fb0a1 ("tracing/ring-buffer: Have polling block on watermark") Signed-off-by: Shiju Jose <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 7802023 commit 3e46d91

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

kernel/trace/trace.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9148,9 +9148,6 @@ buffer_percent_write(struct file *filp, const char __user *ubuf,
91489148
if (val > 100)
91499149
return -EINVAL;
91509150

9151-
if (!val)
9152-
val = 1;
9153-
91549151
tr->buffer_percent = val;
91559152

91569153
(*ppos)++;

0 commit comments

Comments
 (0)