[PATCH v3 0/1] pipe: only enable the extra wake_up(rd_wait) for edge-triggered consumers

From: Oleg Nesterov

Date: Thu Jul 30 2026 - 10:18:45 EST


Let me repeat, I do not think this patch can improve performance. In fact
I only hope that none of (micro)benchmarks will suffer, they are often
very sensitive to any changes in pipe.c

And yes, even if this patch is correct (I hope) it can expose the latent
bugs that were hidden by the extra wakeup, like it happened in the past.

But at least the comments should be updated: io_uring depends on poll_usage
"nasty semantics" too and this is not obvious at all. And IMO, the EPOLLET
check added by this patch acts as a documentation too.

And if this patch does cause a regression... I think we need to learn who
else depends on the extra wakeup and how; this is something we should know
anyway.

Changes since v2: renamed ->poll_usage to ->poll_et, and updated comments.

See the tests in 1/1, both pass. And both fail if I remove
WRITE_ONCE(pipe->poll_usage) in pipe_poll().

Oleg.
---

fs/pipe.c | 15 ++++++++-------
include/linux/pipe_fs_i.h | 4 ++--
2 files changed, 10 insertions(+), 9 deletions(-)