swift-nio icon indicating copy to clipboard operation
swift-nio copied to clipboard

Linux: full io_uring I/O

Open weissi opened this issue 3 years ago • 4 comments

With @hassila's fantastic work in #1804 (and beyond), the path for SwiftNIO on io_uring has begun. To fully leverage all the potential benefits, we should at some point offer SwiftNIO doing I/O through io_uring (with #1804 we're doing "uring lite" which uses io_uring only for eventing but the regular syscalls for the actual I/O).

For inspiration, there is of course netty-incubator-transport-io_uring.

To facilitate development (and maybe also spike out #1829) we could start this off in a separate repository which would mean we can break API more easily and aren't bound to NIO's pretty vast Swift version compatibilities. This will very likely require new Channel and EventLoop types anyway so a separate repository may not be too bad. The biggest concern is probably the inability to reach NIO internals for which we should come up with a story (maybe via @_spi)

weissi avatar Apr 28 '21 11:04 weissi

CC @Lukasa / @hassila sorry, just a quick blurb here to have a place to discuss when the time comes.

weissi avatar Apr 28 '21 11:04 weissi

Also related to what we discussed in https://github.com/apple/swift-nio/issues/1805.

hassila avatar Apr 28 '21 12:04 hassila

The initial POC of how it can be done is here https://github.com/apple/swift-nio/pull/2357 Can discuss it in the PR.

ser-0xff avatar Jan 24 '23 12:01 ser-0xff

An update of state of io_uring & networking from Jens Axboe:

https://kernel.dk/io_uring%20and%20networking%20in%202023.pdf

hassila avatar Feb 15 '23 12:02 hassila