GeezerVison is showing github.com — transport: Avoid io_uring completion callback allocation by massiccio · Pull Request #17457 · netty/netty
Conversation
massiccio
commented
Sep 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Motivation:
IoUringIoHandler creates a completion callback on the io_uring poll path. C2 cannot eliminate the callback across the compiled helper boundary, causing avoidable per-poll allocation.
Modification:
Cache the stateless io_uring completion callback in a final instance field and reuse it across (1) normal polling and (2) shutdown completion processing.
The stateful DrainFdEventCallback remains local because it tracks eventfd state.
Validation:
- Real Linux io_uring workload completed at approximately 11,000 requests/sec for 120 seconds.
- Exact JFR allocation capture:
- Before: 84 IoUringIoHandler lambda events, approximately 78 MB event-loop allocation.
- After: 0 lambda events, approximately 17 MB event-loop allocation.
- No throughput regression, errors, pending requests, or missed requests.
Result:
Fixes #17437
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Motivation: IoUringIoHandler creates a completion callback on the io_uring poll path. C2 cannot eliminate the callback across the compiled helper boundary, causing avoidable per-poll allocation.
Modifications:
Cache the stateless CompletionCallback in a final instance field and reuse it for normal completion processing and shutdown draining. Preserve the local stateful eventfd callback.
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.
Waiting for the CI but +1 from me
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
testlens-app
Bot
commented
Sep 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
✅ All tests passed ✅
🏷️ Commit: 4fca321
▶️ Tests: 463832 executed
⚪️ Checks: 27/27 completed
Learn more about TestLens at testlens.app/docs.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
massiccio reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
normanmaurer
pushed a commit
that referenced
this pull request
Sep 14, 2026
…on (#17467)
Auto-port of #17457 to 5.0
Cherry-picked commit: a0faa5e
---
# Motivation:
IoUringIoHandler creates a completion callback on the io_uring poll
path. C2 cannot eliminate the callback across the compiled helper
boundary, causing avoidable per-poll allocation.
# Modification:
Cache the stateless io_uring completion callback in a final instance
field and reuse it across (1) normal polling and (2) shutdown completion
processing.
The stateful DrainFdEventCallback remains local because it tracks
eventfd state.
Validation:
- Real Linux io_uring workload completed at approximately 11,000
requests/sec for 120 seconds.
- Exact JFR allocation capture:
- Before: 84 IoUringIoHandler lambda events, approximately 78 MB
event-loop allocation.
- After: 0 lambda events, approximately 17 MB event-loop allocation.
- No throughput regression, errors, pending requests, or missed
requests.
# Result:
Fixes #17437
Co-authored-by: massiccio <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|