Event language
UI language
Traditional I/O syscalls in Linux have generally been implemented as a synchronous mechanism. These calls wait in user space until the I/O request has been completed. Besides blocking, each syscall will undergo two-time mode switches, whose overhead cannot be ignored after Meltdown and Spectre mitigation. Some syscall–heavy applications have been reported to be slowed down to 30% on KPTI-protected systems. Both blocking and mode switch seriously hamper the performance, especially for I/O-intensive applications (e.g. HTTP daemons and database servers). To suppress blocking time of userland procedure and overhead from mode switch, it is common to adopt asynchronous I/O model. In Linux 2.5, Linux native AIO (<em>libaio</em>) was introduced, which is a kernel-level implementation and performs better than POSIX AIO. However, it only supports direct I/O, limits the file size, and other more and more restrictions. They lead <em>libaio</em> hard to use and inefficient. In Linux 5.1, Jens Axboe proposed an asynchronous I/O interface: <em>io_uring</em> which makes Linux native AIO more efficient and extends its applicability. In this talk, we will introduce the evolution of Linux I/O models. Further, we will detailly explain the design, implementation, and optimization of <em>io_uring</em>.