Experimental io_uring AIO implementation for disk IO#8992
Merged
Conversation
Contributor
|
[approve ci] |
Member
|
I wonder if we can also have a run-time setting (i.e. one for records.config) to enable/disable io_uring. It would be useful for testing/trouble shooting. And it would be also nice to be able to enable io_uring for disk IO and socket IO separately (e.g. 0: disabled, 1: just disk IO, 2: just socket IO, 3: the both). |
d6d94b8 to
6cba942
Compare
104bac4 to
459937a
Compare
22a35f7 to
459937a
Compare
bryancall
previously approved these changes
Oct 24, 2022
22a35f7 to
e0cd761
Compare
e0cd761 to
e5b02fd
Compare
bryancall
approved these changes
Oct 24, 2022
Contributor
Author
|
[approve ci] |
1 similar comment
Contributor
Author
|
[approve ci] |
SolidWallOfCode
pushed a commit
to SolidWallOfCode/trafficserver
that referenced
this pull request
Nov 15, 2022
* add io_uring feature to build * link liburing library. Start adding implementation * rename to DiskHandler to match native aio * better way to integrate with net * wip * add diskhandler to main thread, link sqe ops for aio ops with multiple operations * cleanup * build should work without io_uring configured * add config * Finish config, attach parent wq, configure bounded/unbounded queues * restore accidental line removal * remove unused include * set io opcode and increment stats * Forward declare DiskHandler * io_uring stats * fix AIO_STAT_COUNT * fix newline at end of file Co-authored-by: Chris McFarlen <cmcfarlen@apple.com>
moonchen
pushed a commit
to moonchen/trafficserver
that referenced
this pull request
Jun 21, 2026
Add ATS-INTEGRATION.md investigating how the prototype's coroutine layer maps onto real ATS plumbing. Key finding: the merged disk-AIO io_uring work (apache#8992) already gives every ET_NET thread a thread_local IOUringContext that is submitted and drained inside NetHandler::waitForActivity via an eventfd bridge. So there is no new reactor or thread to build: - Seam 1 (backend) == IOUringContext (local_context(), next_sqe, submit, service) - Seam 2 (resume) == IOUringContext::service() -> IOUringCompletionHandler:: handle_complete(cqe), called in waitForActivity on the owning EThread (affinity is free; runs under the NH mutex) Includes a concrete UringOp awaitable that IS an IOUringCompletionHandler and resumes a coroutine from the existing service() dispatch, replacing net-iouring's hand-written IOUringReader/IOUringWriter + ops_in_flight with one awaitable per suspend. Notes the caveats: sockets are still epoll on master (add socket ops to the same context, as the net-iouring branch did), close needs prep_cancel, and submit is already batched per loop. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RVTMqDkJfzkeKY6u7kVEE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for using io_uring for AIO on Linux hosts.
For this implementation, each net thread and the main thread would have its own io_uring command queue for doing disk io. The io_uring queue processing is integrated into the net thread's epoll loop via eventfd. In this approach, there are no AIO specific threads and any request specifying AIO thread completion will be handled in the the net/main thread.