-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# What is io_uring? | ||
|
||
An attempt at concise explanation of what io_uring is. | ||
|
||
`io_uring` is a new Linux kernel interface for making system calls. | ||
Traditionally, syscalls are submitted to the kernel *individually* and | ||
*synchronously*: a syscall CPU instruction transfers control from the | ||
application to the kernel; control returns to the application only when the | ||
syscall is completed. In contrast, `io_uring` is a *batched* and *asynchronous* | ||
interface. The application submits several syscalls by writing their codes & | ||
arguments to a lock-free shared-memory ring buffer. The kernel reads the | ||
syscalls from this shared memory and executes them at its own pace. To | ||
communicate results back to the application, the kernel writes the results to a | ||
second lock-free shared-memory ring buffer, where they become available to the | ||
application asynchronously. | ||
|
||
You might want to use `io_uring` if: | ||
|
||
- you need extra performance unlocked by amortizing userspace/kernelspace | ||
context switching across entire batches of syscalls, | ||
- you want a unified asynchronous interface to the entire system. | ||
|
||
You might want to avoid `io_uring` if: | ||
|
||
- you need to write portable software, | ||
- you want to use only old, proven features, | ||
- and in particular you want to use features with a good security track record. |