Re: [PATCH] pipe: keep per-write wakeups for EPOLLEXCLUSIVE consumers
From: Oleg Nesterov
Date: Wed Nov 11 2026 - 18:45:58 EST
On 11/11, Mani Tofigh via B4 Relay wrote:
>
> From: Mani Tofigh <mt4022@xxxxxxxxxxxx>
>
> A task blocked in read() on a pipe can sleep while the pipe holds data,
> when an epoll(EPOLLEXCLUSIVE) watcher of the read end was added before
> it. The watcher's entry on ->rd_wait is exclusive and sits ahead of the
> reader, so a write into an empty pipe wakes only the watcher.
I am already sleeping, but at first glance this is already wrong?
I mean, a WQ_FLAG_EXCLUSIVE waiter should not sit ahead of non-exclusive
waiter, no?
Oleg.