Ramblings of an aging IT geek
← Ramblings of an aging IT geek
linux

poking at io_uring on a fresh kernel

First impressions of Linux's new io_uring asynchronous I/O interface after building a recent kernel to try it on a homelab box.

A terminal showing a freshly built Linux kernel booting

io_uring landed in 5.1 back in May, and I've finally built a kernel new enough to play with it. The short version: it's the first Linux async I/O interface that doesn't make me wince. Native AIO was always a disappointment, it only really worked for unbuffered direct I/O and fell back to blocking the moment you looked at it sideways. io_uring is a proper shared-memory ring between userspace and the kernel: you push submission queue entries, the kernel pushes completions back, and in the best case you do real I/O without a syscall per operation at all.

I didn't write raw ring code by hand. Axboe's liburing wraps the setup so you get io_uring_get_sqe, fill it in, io_uring_submit, then reap completions. The API is small and the examples in the repo are enough to get a working echo of a file in an afternoon. Reading a file and counting bytes felt unremarkable, which is exactly the point: the interesting part is that the same mechanism handles reads, writes, fsync and the network, so one event loop can drive everything.

It's early. The kernel surface is moving fast, opcodes are still being added, and I wouldn't put anything I cared about on it in production yet. But this is the first time in years that async I/O on Linux has felt like it was designed rather than tolerated. Worth keeping an eye on.