io_uring in less than 2^10 characters
In the conventional syscall interface, system calls are submitted to the kernel synchronously, and individually.
When a syscall is invoked; the kernel takes over control, and returns control when it finishes.
io_uring
is a new batched, asynchronous syscall interface; an application "inserts" one or more syscalls with their corresponding code && args to a lock-free shared memory ring buffer.
The kernel reads the supplied syscalls, and executes them at a pace of his own. The kernel pushes the result into another, lock-free shared memory ring buffer.
Who would benefit from io_uring
? applications which are asynchronous in nature eg. web servers, DBMSs.
Who wouldn't benefit from io_uring
? sysadmins tasked with running the new shiny SaaS on centos 7.
io_uring
has many subtle and nuanced implementation details, yet the core structure hasn't changed much.
Notes
- A syscall, or system call, is the interface in which user-space application request services, or procedures, from the kernel.
- A lock-free shared memory ringbuffer is just a technical way of describing a circular data structure which can be written && read by multiple processies, safely.