The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Breno Leitao <leitao@debian.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	io-uring@vger.kernel.org, Alexey Gladkov <legion@kernel.org>
Subject: Re: [PATCH 0/1] pipe: only enable the extra wake_up(rd_wait) when epoll is actually used
Date: Mon, 27 Jul 2026 13:50:17 +0200	[thread overview]
Message-ID: <amdF-Ulltna5AV85@redhat.com> (raw)
In-Reply-To: <amc4SXBOGmLbfmp3@gmail.com>

On 07/27, Breno Leitao wrote:
>
> On Fri, Jul 24, 2026 at 04:54:30PM +0200, Oleg Nesterov wrote:
> >
> > __Perhaps__ pipe_poll() could check something like wait->_key & EPOLLET to
> > detect both epoll/io_uring... Not sure, probably not, I'll try to check later.
>
> I got the impression that pipe_poll() sees EPOLLET in wait->_key for
> io_uring the same as for EPOLLET epoll. Since d59bd748db0a
> ("io_uring/poll: disable level triggered poll").
>
> io_poll_add_prep(), which is called before teh proper iouring command,
> rejects IORING_POLL_ADD_LEVEL, so io_poll_parse_events() always ORs in
> EPOLLET for IORING_OP_POLL_ADD.
>
> The internal apoll path sets EPOLLET unconditionally too
> (io_arm_apoll()), so every io_uring poll arming carries it.
>
> Maybe this would work on the set side?
>
>         if ((filp->f_mode & FMODE_READ) && wait &&
>             (wait->_key & EPOLLET) &&

This is exactly what I meant and what I did. I am writing the changelog,
will send the patch soon today. Both test-cases I wrote pass, same for
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c

Oleg.


  reply	other threads:[~2026-07-27 11:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 14:51 [PATCH 0/1] pipe: only enable the extra wake_up(rd_wait) when epoll is actually used Oleg Nesterov
2026-07-23 14:52 ` [PATCH 1/1] " Oleg Nesterov
2026-07-23 16:41   ` Mateusz Guzik
2026-07-23 15:10 ` [PATCH 0/1] " Oleg Nesterov
2026-07-24 13:58   ` Oleg Nesterov
2026-07-24 14:43     ` Mateusz Guzik
2026-07-24 14:54       ` Oleg Nesterov
2026-07-27 11:06         ` Breno Leitao
2026-07-27 11:50           ` Oleg Nesterov [this message]
2026-07-25 15:19     ` Oleg Nesterov

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=amdF-Ulltna5AV85@redhat.com \
    --to=oleg@redhat.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=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