Io_uring: what is it?

I’ve recently been seeing io_uring come up in locations. Understanding it has something to do with input and output, what exactly is it?

*The question was originally asked on Stack Overflow by Amani

io_uring is a (new as of mid-2019) Linux kernel interface to efficiently allows you to send and receive data asynchronously. It was originally designed to target block devices and files but has since gained the ability to work with things like network sockets.

Unlike something like epoll(), it is built around a completion model rather than a readiness model. This is desirable because other operating systems have used the completion model successfully for some time. io_uring provides something competitive and complete for Linux without the drawbacks the previous Linux AIO interface has.

The author of io_uring has written a PDF document titled Efficient IO with io_uring, which technically discusses its usage. A gentler introduction is provided by the Lord of the io_uring guide. You can read ScyllaDB developer Glauber Costa proselytize it in How io_uring and eBPF Will Revolutionize Programming in Linux. Lastly, has written about io_uring many times.

*The answer was originally provided on Stack Overflow by Anon