Skip to content

Commit c96fff3

Browse files
Tao Cheningomolnar
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 <chen.dylane@linux.dev> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250314030036.2543180-1-chen.dylane@linux.dev
1 parent f4b07fd commit c96fff3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)