From: Oleg Nesterov <oleg@redhat.com>
To: Breno Leitao <leitao@debian.org>
Cc: Christian Brauner <brauner@kernel.org>,
Mateusz Guzik <mjguzik@gmail.com>, Jens Axboe <axboe@kernel.dk>,
Pavel Begunkov <asml.silence@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Alexey Gladkov <legion@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
io-uring@vger.kernel.org
Subject: Re: [PATCH v3 1/1] pipe: only enable the extra wake_up(rd_wait) for edge-triggered consumers
Date: Thu, 30 Jul 2026 16:38:34 +0200 [thread overview]
Message-ID: <amth6owVUdVOmyAL@redhat.com> (raw)
In-Reply-To: <amteY30qxRuPzFh3@gmail.com>
Hi Breno,
thanks for taking a look!
On 07/30, Breno Leitao wrote:
>
> On Thu, Jul 30, 2026 at 04:12:22PM +0200, Oleg Nesterov wrote:
> > - /* Epoll has some historical nasty semantics, this enables them */
> > - if (unlikely(!READ_ONCE(pipe->poll_usage)))
> > - WRITE_ONCE(pipe->poll_usage, true);
> > + /* Enable edge-triggered (epoll, io_uring) per-write wakeups */
> > + if ((filp->f_mode & FMODE_READ) &&
> > + wait && (wait->_key & EPOLLET) &&
> > + unlikely(!READ_ONCE(pipe->poll_et)))
> > + WRITE_ONCE(pipe->poll_et, true);
>
> Can I ask you to factor this out set code, and comment this nasty
> semantics in the function and why we need to do it?
Dou you mean a new helper?
You can't imagine how much time I spent trying to make the comments more
clear but keep them concise ;) More than writing the test for io_uring.
What exactly do you think the comment should say? I agree with anything in
advance. I thought that "edge-triggered" provides enough info, but I would
be happy to improve the docs.
And the helper's name? pipe_enable_poll_et() ?
Thanks,
Oleg.
next prev parent reply other threads:[~2026-07-30 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:11 [PATCH v3 0/1] pipe: only enable the extra wake_up(rd_wait) for edge-triggered consumers Oleg Nesterov
2026-07-30 14:12 ` [PATCH v3 1/1] " Oleg Nesterov
2026-07-30 14:26 ` Breno Leitao
2026-07-30 14:38 ` Oleg Nesterov [this message]
2026-07-30 16:36 ` [PATCH v3 0/1] " 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=amth6owVUdVOmyAL@redhat.com \
--to=oleg@redhat.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=jack@suse.cz \
--cc=legion@kernel.org \
--cc=leitao@debian.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=torvalds@linux-foundation.org \
--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