-
Notifications
You must be signed in to change notification settings - Fork 111
[runtime/iouring] use submit_with_args for bounded waits #1467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[runtime/iouring] use submit_with_args for bounded waits #1467
Conversation
If you're aware of a better way to handle network-driven ops in |
I think the best way to go about it would be to gradually incorporate more of the features that io_uring provides: vectored reads/writes, multishot, registered buffers, zero-copy (thought might not be worth it for small messages), SQPOLL and FAST_POLL. In no particular order. |
I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 nits otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the io_uring runtime to use the EXT_ARG feature for bounded waits instead of submitting timeout SQEs. The change reduces overhead by leveraging kernel 5.11+ functionality that allows timeouts to be specified directly in the submission arguments.
- Replaces timeout SQE submissions with
submit_with_args
using timespec for both force polling and shutdown timeouts - Removes special timeout work IDs and associated handling logic for force polling and shutdown
- Simplifies the drain function by eliminating async timeout management
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1467 +/- ##
==========================================
+ Coverage 91.69% 91.71% +0.01%
==========================================
Files 278 278
Lines 70326 70501 +175
==========================================
+ Hits 64487 64658 +171
- Misses 5839 5843 +4 see 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Replaces timeout SQEs for
force_poll
andshutdown_timeout
withsubmit_with_args
with a timespec, which uses the kernel's EXT_ARG feature (5.11+) for bounded waits without the overhead of submitting and processing timeout operations.See
IORING_ENTER_EXT_ARG
in https://man7.org/linux/man-pages/man2/io_uring_enter.2.html.