Skip to contentSkip to conversation

io_uring epoll reaping support

GIT PULL Merged Jens Axboe 2 participants 3 messages Mar 27, 2025 – Mar 28, 2025 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

Hi Linus,

This sits on top of the recently sent out zero-copy rx pull request.

This adds support for reading epoll events via io_uring. While this may seem counter-intuitive (and/or productive), the reasoning here is that quite a few existing epoll event loops can easily do a partial conversion to a completion based model, but are still stuck with one (or few) event types that remain readiness based. For that case, they then need to add the io_uring fd to the epoll context, and continue to rely on epoll_wait(2) for waiting on events. This misses out on the finer grained waiting that io_uring can do, to reduce context switches and wait for multiple events in one batch reliably.

With adding support for reaping epoll events via io_uring, the whole legacy readiness based event types can still be reaped via epoll, with the overall waiting in the loop be driven by io_uring.

Relies on a prep patch that went in via the VFS tree already. Please pull!

The following changes since commit 0511f4e6a16988e485a5e60727c89e2ca9f83f44:

Merge patch series "epoll changes for io_uring wait support" (2025-02-20 10:18:47 +0100)

are available in the Git repository at:

git://git.kernel.dk/linux.git for-6.15/io_uring-rx-zc-20250325

for you to fetch changes up to 19f7e942732766aec8a51d217ab5fb4a7fe3bb0d:

io_uring/epoll: add support for IORING_OP_EPOLL_WAIT (2025-02-20 07:59:56 -0700)

----------------------------------------------------------------
Jens Axboe (5):
Merge branch 'for-6.15/io_uring' into for-6.15/io_uring-epoll-wait
Merge branch 'for-6.15/io_uring-rx-zc' into for-6.15/io_uring-epoll-wait
Merge branch 'vfs-6.15.eventpoll' of https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs into for-6.15/io_uring-epoll-wait io_uring/epoll: remove CONFIG_EPOLL guards
io_uring/epoll: add support for IORING_OP_EPOLL_WAIT

 include/uapi/linux/io_uring.h |  1 +
 io_uring/Makefile             |  9 +++++----
 io_uring/epoll.c              | 35 +++++++++++++++++++++++++++++++++--
 io_uring/epoll.h              |  2 ++
 io_uring/opdef.c              | 14 ++++++++++++++
 5 files changed, 55 insertions(+), 6 deletions(-)
Signature · 1 line
Jens Axboe
author maintainer
#1 lore raw
Quoted 14 lines · Jens Axboe

Hi Linus,

This sits on top of the recently sent out zero-copy rx pull request.

This adds support for reading epoll events via io_uring. While this may seem counter-intuitive (and/or productive), the reasoning here is that quite a few existing epoll event loops can easily do a partial conversion to a completion based model, but are still stuck with one (or few) event types that remain readiness based. For that case, they then need to add the io_uring fd to the epoll context, and continue to rely on epoll_wait(2) for waiting on events. This misses out on the finer grained waiting that io_uring can do, to reduce context switches and wait for multiple events in one batch reliably.

Quoted 6 lines

With adding support for reaping epoll events via io_uring, the whole legacy readiness based event types can still be reaped via epoll, with the overall waiting in the loop be driven by io_uring.

Relies on a prep patch that went in via the VFS tree already. Please pull!

And even with having prepared this earlier, guess a big conference dinner was enough to still make me mess this up. The correct git location is of course:

git://git.kernel.dk/linux.git for-6.15/io_uring-epoll-wait-20250325

which is what I get for creating the signed tag later than the actual PR write-up.

Everything else in the original should be fine as-is, thanks!

Signature · 1 line
Jens Axboe
merge bot Merged
#2 lore raw
In reply to Jens Axboe
The pull request you sent on Thu, 27 Mar 2025 05:47:56 -0600:

The pull request you sent on Thu, 27 Mar 2025 05:47:56 -0600:

Quoted 1 line

git://git.kernel.dk/linux.git for-6.15/io_uring-rx-zc-20250325

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6e3da40ed6f3508dcf34b1539496bcccef7015ef

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html