All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next v2] perf/ring_buffer: Add EPOLLRDNORM flag for poll
@ 2025-03-14  3:00 Tao Chen
  2025-03-17  7:47 ` [tip: perf/core] perf/ring_buffer: Allow the " tip-bot2 for Tao Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Tao Chen @ 2025-03-14  3:00 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, kan.liang, fweisbec
  Cc: linux-perf-users, linux-kernel, Tao Chen

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: 76369139ceb9 ("perf: Split up buffer handling from core code")
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
---
 kernel/events/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Change list:
- v1 -> v2:
    - add changelog
- v1
  https://lore.kernel.org/all/20250313051047.2436098-1-chen.dylane@linux.dev

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 59a52b1a1..5130b119d 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -19,7 +19,7 @@
 
 static void perf_output_wakeup(struct perf_output_handle *handle)
 {
-	atomic_set(&handle->rb->poll, EPOLLIN);
+	atomic_set(&handle->rb->poll, EPOLLIN | EPOLLRDNORM);
 
 	handle->event->pending_wakeup = 1;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-17  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14  3:00 [PATCH linux-next v2] perf/ring_buffer: Add EPOLLRDNORM flag for poll Tao Chen
2025-03-17  7:47 ` [tip: perf/core] perf/ring_buffer: Allow the " tip-bot2 for Tao Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.