32 lines
1.5 KiB
Text
32 lines
1.5 KiB
Text
|
|
Specification for the Demo
|
||
|
|
==========================
|
||
|
|
:Date: Summer 2026
|
||
|
|
:Author: Ichthyostega <Ichthyostega@web.de>
|
||
|
|
:toc:
|
||
|
|
:toclevels: 3
|
||
|
|
|
||
|
|
This specification is the result of our research and provides a short summary of the relevant
|
||
|
|
aspects of io_uring. Furthermore, the specific design of the demo code is explained and motivated.
|
||
|
|
|
||
|
|
[red yellow-background]#TBW#
|
||
|
|
|
||
|
|
|
||
|
|
IO_URING kernel interface
|
||
|
|
-------------------------
|
||
|
|
|
||
|
|
Liburing
|
||
|
|
~~~~~~~~
|
||
|
|
This helper library provides a thin wrapper to encapsulate most of the minute technical details
|
||
|
|
related to the ringbuffers. The kernel interface as such is defined in a rather indirect way,
|
||
|
|
so that most data definitions are exposed dynamically, at runtime in the form of relative field
|
||
|
|
offsets. Also the structure of the ringbuffers is not defined directly as a data type; rather
|
||
|
|
the well-known low-level C implementation of a index based ringbuffer is assumed like a coding
|
||
|
|
template. Working with such a structure requires solid knowledge in system programming, including
|
||
|
|
the proper usage of memory barriers. The Liburing handles all those tricky details behind a function
|
||
|
|
based interface, that should be much more familiar to most programmers.
|
||
|
|
|
||
|
|
To avoid a performance penalty due to this indirection and encapsulation, Liburing is defined
|
||
|
|
to a large extent in the form of _static inline functions_. A variant called `liburing-ffi` is provided
|
||
|
|
as alternative for cross-language bindings and for usage with older compilers, providing an definition
|
||
|
|
and binary symbol for each function; obviously using these explicit calls adds a noticeable penalty.
|