A companion repository for the io_uring by Example article series
This repository is a companion repo for the article series io_uring By Example on the Unixism blog.
It features a set of example programs that serve as an example to illustrate the usage of Linux's io_uring subsystem. The examples build one on top of the other, becoming progressively complex.
Here are what the examples do: -
01_regular_cat: This is an example of a "cat" program equivalent that uses regular, synchronous I/O. This program is there to illustrate the difference between synchronous I/O and the asynchronous iouring API. - `02caturing`: This example builds a version of cat with the raw interface provided by iouring. This is done so that the user understands how the iouring interface works at a low-level. - `03catliburing
: This example is functionally the same as the previous example, but uses the higher-level API provided by liburing. -04cpliburing`: This example is an implementation of a copy command that uses multiple requests in iouring's submission queue. -
05_webserver_liburing: This is the final example in the series. This bulids a simple web server that is capable of serving static files. It illustrates the use of
accept(), along with
Please note that you will need at least Linux kernel version 5.5 and above to get all these examples to work. Support for the
accept()operation in io_uring was added in kernel v5.5.