io_uring
io_uring is a Linux asynchronous I/O interface that exchanges requests and completion results through shared submission and completion rings.
Batching can reduce per-request submission overhead; it does not establish persistence. The completion result belongs to the specific operation, not to the ring as a whole. For file updates, identify the write set and its synchronization protocol. [1] Linux v6.14 supports a separate PI metadata attribute for reads/writes; that path requires O_DIRECT and participating lower layers, and does not replace synchronization. [3]
IORING_SETUP_IOPOLL targets storage completions; IORING_SETUP_SQPOLL runs a kernel thread checking submissions. SQPOLL alone does not select device-completion polling. The submission thread can sleep, requiring a wakeup; lower syscall counts do not establish lower total CPU cost. [5]
Didona et al. found that the kernel submission poller could compete with the application for scarce cores in their Linux 5.13 raw-device tests. Their 4 KiB random-read study is not a current-kernel sizing rule or a filesystem benchmark. [6]
Asynchronous requests may use io-wq helper threads. IOSQE_ASYNC requests immediate offload instead of the initial nonblocking issue attempt; it does not establish write ordering. [7]
Relations
- related
- io_uring completion queue entry, io_uring linked requests, io_uring drain, fsync, Queue depth, io_uring integrity metadata, io_uring cancellation, io_uring linked timeout, io_uring registered files, io_uring registered buffers, io_uring provided buffers, RWF_HIPRI, io-wq, IOSQE_ASYNC
Advantages
- Supports batched asynchronous operations without requiring every request to use a separate synchronous syscall.
Limitations
- Availability and behavior depend on the operation, kernel and filesystem.
Citations
- liburing: io_uring(7), result reporting and shared rings.
- Linux v6.14: io_prep_rw_pi, io_prep_rw and io_rw_init_file in io_uring/rw.c.
- liburing: io_uring_setup(2), IOPOLL and SQPOLL
- Didona et al., Understanding Modern Storage APIs, SYSTOR 2022, sections 3.1-3.3 and 4
- liburing 2.10: io_uring_sqe_set_flags(3), IOSQE_ASYNC