Skip to content

Auto-port 5.0: IoUring: Reduce unnecessary io_uring_enter syscalls on non-blocking path#16397

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-16259-to-5.0
Mar 3, 2026
Merged

Auto-port 5.0: IoUring: Reduce unnecessary io_uring_enter syscalls on non-blocking path#16397
chrisvest merged 1 commit into
5.0from
auto-port-pr-16259-to-5.0

Conversation

@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port of #16259 to 5.0
Cherry-picked commit: bedd0ac


Motivation:

In IoUringIoHandler.run(), the non-blocking path unconditionally calls io_uring_enter via submitAndClearNow() even when there are no pending SQEs and no deferred task work to flush.

Modification:

  • Enable IORING_SETUP_TASKRUN_FLAG when IORING_SETUP_DEFER_TASKRUN is set,
    so the kernel signals IORING_SQ_TASKRUN when deferred completions are pending.

Result:

Fixes #16247.

No regression under high concurrency load. Under IO-idle non-blocking
path scenario, io_uring_enter calls reduced from 486 to 65 (-86.6%).

…ath (#16259)

Motivation:

In `IoUringIoHandler.run()`, the non-blocking path unconditionally calls
`io_uring_enter` via `submitAndClearNow()` even when there are no
pending SQEs and no deferred task work to flush.

Modification:

- Enable `IORING_SETUP_TASKRUN_FLAG` when `IORING_SETUP_DEFER_TASKRUN`
is set,
so the kernel signals `IORING_SQ_TASKRUN` when deferred completions are
pending.

Result:

Fixes #16247.

No regression under high concurrency load. Under IO-idle non-blocking
path scenario, `io_uring_enter` calls reduced from 486 to 65 (-86.6%).

---------

Co-authored-by: Norman Maurer <[email protected]>
(cherry picked from commit bedd0ac)
@chrisvest chrisvest added this to the 5.0.0.Final milestone Mar 3, 2026
@chrisvest chrisvest merged commit 514dc66 into 5.0 Mar 3, 2026
21 of 23 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16259-to-5.0 branch March 3, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants