From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mani Tofigh via B4 Relay <devnull+mt4022.columbia.edu@kernel.org>,
Breno Leitao <leitao@debian.org>,
Christian Brauner <brauner@kernel.org>,
Mateusz Guzik <mjguzik@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
tz2294@columbia.edu, stable@vger.kernel.org,
Mani Tofigh <mt4022@columbia.edu>
Subject: Re: [PATCH] pipe: keep per-write wakeups for EPOLLEXCLUSIVE consumers
Date: Tue, 17 Nov 2026 18:25:34 +0100 [thread overview]
Message-ID: <avyODoFhZ_M7YDU5@redhat.com> (raw)
In-Reply-To: <CAHk-=wjOq+G=6gte4vX_YxOD_VfE1uZh7=+KHs8N0wU75xyHEg@mail.gmail.com>
On 11/17, Linus Torvalds wrote:
>
> On Tue, 17 Nov 2026 at 05:27, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > However, EPOLLEXCLUSIVE breaks this logic. ep_ptable_queue_proc() does
> > add_wait_queue_exclusive() if EPOLLEXCLUSIVE is set.
>
> Christ, how I hate epoll. It's a pile of stinking shit.
>
> This literally violates THE WHOLE AND ONLY POINT of exclusive waits.
>
> The rule for an exclusive wait is that it *will* act on the wakeup -
> either by consuming the data, or - if it can't consume it all - by
> waking up the next waiter itself.
>
> So it's not that "EPOLLEXCLUSIVE breaks this logic".
>
> The logic is fine. EPOLLEXCLUSIVE is broken beyond words.
Well, I thought so too. That is why initially I replied "we don't care"
to Mani. But then I decided to summarize and add CC's.
So. Do you agree that we can "ignore" this report from Mani for now?
Until we find a user application that already depends on the behaviour
before f1cebdec9739 (the next write() wakes up a reader which sleeps on
->rd_wait for no reason).
Just in case... io_uring/poll.c:__io_queue_proc does the same:
if (poll->events & EPOLLEXCLUSIVE) {
add_wait_queue_exclusive(head, &poll->wait);
} else {
add_wait_queue(head, &poll->wait);
}
Oleg.
next prev parent reply other threads:[~2026-11-17 17:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:02 Mani Tofigh via B4 Relay
2026-11-11 23:34 ` Oleg Nesterov
2026-11-12 10:26 ` Oleg Nesterov
2026-11-12 12:56 ` Oleg Nesterov
2026-11-17 13:27 ` Oleg Nesterov
2026-11-17 16:22 ` Linus Torvalds
2026-11-17 17:25 ` Oleg Nesterov [this message]
2026-11-17 17:35 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avyODoFhZ_M7YDU5@redhat.com \
--to=oleg@redhat.com \
--cc=brauner@kernel.org \
--cc=devnull+mt4022.columbia.edu@kernel.org \
--cc=jack@suse.cz \
--cc=leitao@debian.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=mt4022@columbia.edu \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tz2294@columbia.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®