by willtemperley
1 subcomments
- Perhaps someone who knows what they're talking about should update the Wikipedia page on io_uring [1]. Someone with a casual interest in Linux internals will probably get a poor impression of io_uring security which appears to be largely due to Google using an old kernel in Android [2].
[1] https://en.wikipedia.org/wiki/Io_uring
[2] https://github.com/axboe/liburing/discussions/1047
- Also worth checking out libxev[1] by Mitchell Hashimoto. It’s a Zig based event loop (similar to libuv) inspired by Tigerbeetle’s implementation.
[1] https://github.com/mitchellh/libxev
by formerly_proven
1 subcomments
- > You can switch a file descriptor into non-blocking mode so the call won’t block while data you requested is not available. But system calls are still expensive, incurring context switches and cache misses. In fact, networks and disks have become so fast that these costs can start to approach the cost of doing the I/O itself. For the duration of time a file descriptor is unable to read or write, you don’t want to waste time continuously retrying read or write system calls.
O_NONBLOCK basically doesn't do anything for file-based file-descriptions - a file is always considered "ready" for I/O.
- I love NT's IO completion ports. I think kqueue is very similar, right? Honestly I've been able to get by using boost asio for cross platform needs but I've always wanted to see if there are better solutions. I think libuv is similar, since it is what node is based on, but I'm not entirely sure what the underlying tech is for non-Windows
- > Hey, maybe we’ll split this out so you can use it too. It’s written in Zig so we can easily expose a C API.
This never happened, did it?
Suppose libex is the alternative.
by RantyDave
2 subcomments
- There was a brief fascination with user mode TCP over DPDK (or similar). What happened with that? Can you get similar performance with QUIC? Does io_uring make it all a moot point?
- Using dispatch looks like redux. I guess same paradigm just different layer
- Awesome post, please make a Zig library!
by up2isomorphism
2 subcomments
- When I am already using things like io_uring already I don’t need any io abstraction.
BTW most of applications is totally fine with a UNIX file apis.