Linux Kernel Getting io_uring To Deliver Fast & Efficient I/O

Written by Michael Larabel in Linux Kernel on 14 February 2019 at 06:13 AM EST. 21 Comments
LINUX KERNEL
The Linux kernel is getting a new ring for Valentine's Day... io_uring. The purpose of io_uring is to deliver faster and more efficient I/O operations on Linux and should be coming with the next kernel cycle.

Linux block maintainer and developer behind io_uring, Jens Axboe of Facebook, queued the new interface overnight into the linux-block/for-next on Git. The io_uring interface provides submission and completion queue rings that are shared between the application and kernel to avoid excess copies. The new interface has just two new system calls (io_uring_setup and io_uring_enter) for dealing with I/O. Axboe previously worked on this code under the "aioring" name.

Io_uring is a lot more efficient than Linux's AIO asynchronous I/O code, there is efficient buffered asynchronous I/O support, the ability to do I/O without even performing a system call via polled I/O, and other efficiency enhancements. The interface patch goes on to explain:
With this setup, it's possible to do async IO with a single system call. Future developments will enable polled IO with this interface, and polled submission as well. The latter will enable an application to do IO without doing ANY system calls at all.

For IRQ driven IO, an application only needs to enter the kernel for completions if it wants to wait for them to occur.

Each io_uring is backed by a workqueue, to support buffered async IO as well. We will only punt to an async context if the command would need to wait for IO on the device side. Any data that can be accessed directly in the page cache is done inline. This avoids the slowness issue of usual threadpools, since cached data is accessed as quickly as a sync interface.
The design philosophy with io_uring appears to be on delivering fast and efficient I/O for Linux.

There is liburing as the user-space library built around the new interfaces. Axboe's FIO benchmark has also been adapted already to support io_uring. This should be another feature worth getting excited about come Linux 5.1.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week