Skip to content

Commit c96fff3

Browse files
Tao ChenIngo Molnar
authored andcommitted
perf/ring_buffer: Allow the EPOLLRDNORM flag for poll
The poll man page says POLLRDNORM is equivalent to POLLIN. For poll(), it seems that if user sets pollfd with POLLRDNORM in userspace, perf_poll will not return until timeout even if perf_output_wakeup called, whereas POLLIN returns. Fixes: 7636913 ("perf: Split up buffer handling from core code") Signed-off-by: Tao Chen <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f4b07fd commit c96fff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/ring_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
static void perf_output_wakeup(struct perf_output_handle *handle)
2121
{
22-
atomic_set(&handle->rb->poll, EPOLLIN);
22+
atomic_set(&handle->rb->poll, EPOLLIN | EPOLLRDNORM);
2323

2424
handle->event->pending_wakeup = 1;
2525

0 commit comments

Comments
 (0)