TIL: io_uring and file I/O
The key insight of io_uring is the shared ring buffer between kernel and userspace. No syscall needed to submit I/O — just write to the submission queue and the kernel picks it up.
struct io_uring_sqe *sqe = io_uring_get_sqe(&ring);
io_uring_prep_read(sqe, fd, buf, size, offset);
io_uring_submit(&ring);
This amortizes syscall overhead across many operations. For high-throughput storage workloads, this is a game changer.