Hab den Text noch etwas ausgefeilt. Auch noch einige Formulierungs-Verbesserungen gemäß ChatGPT eingearbeitet.
61 lines
3.2 KiB
Text
61 lines
3.2 KiB
Text
Antrag für einen Vortrag auf der FrOSCon 26
|
|
===========================================
|
|
:author: Ichthyostega
|
|
:date: 23.5.2026
|
|
|
|
|
|
Reading Video data with IO_URING
|
|
--------------------------------
|
|
.putting a new kernel framework into practical use
|
|
In diesem Vortrag geht es um eine technische Herausforderung, die wir für unser
|
|
OpenSource-Projekt lösen mussten: eine große Menge Video-Daten effizient einlesen.
|
|
Vor diesem Hintergrund möchte ich das neue IO_URING Kernel-Interface erläutern
|
|
und mit vereinfachten Code-Beispielen in C++ zeigen, wie es in eine Applikation
|
|
eingebunden werden kann. Rudimentäre C++ Kenntnisse sollten genügen, um dem
|
|
Vortrag zu folgen, Kennnisse in Systemprogrammierung werden nicht vorrausgesetzt.
|
|
|
|
Für die eigentliche Darstellung rechne ich mit 40 Minuten.
|
|
|
|
|
|
Kurzfassung
|
|
~~~~~~~~~~~
|
|
<b>io_uring</b> is a fairly new I/O interface in the Linux kernel.
|
|
It represents a shift in how applications interact with the kernel.
|
|
Instead of transferring control through a system-call interface into kernel mode,
|
|
operations are submitted asynchronously through shared queues.
|
|
|
|
This talk discusses patterns for dealing with asynchronous I/O and demonstrates a setup
|
|
for high-volume file reading using this framework, illustrated with code examples in C++.
|
|
|
|
<i>Lumiera</i> is a video editing application under development in C++ and serves here
|
|
as a real-world example showing how asynchronous I/O can play a key role in achieving
|
|
adequate throughput for video processing.
|
|
|
|
|
|
Langfassung
|
|
~~~~~~~~~~~
|
|
The usual straightforward way to read data from a file is to invoke a <tt>read()</tt>
|
|
function and receive the requested data directly in response. While this function
|
|
is typically exposed through the programming language's standard library, it ultimately
|
|
maps to a system call provided by the OS-kernel. Although this approach is simple in
|
|
terms of program logic, it has the disadvantage that the calling thread is blocked,
|
|
for an unknown amount of time, until the data becomes available.
|
|
|
|
Blocking behaviour is particularly problematic in high-performance applications, because it
|
|
reduces control over execution timing and may leave computational resources idle. Various
|
|
interfaces and frameworks have been developed over time to address this issue, both for
|
|
network communication and for file operations. The Linux kernel system call interface
|
|
<b>io_uring</b>, adopted in kernel version 5.1 (2019) and gradually expanded since then,
|
|
takes these efforts one step further by providing a uniform framework for many kinds of
|
|
I/O operations: Client code submits requests to the kernel via shared queue, while
|
|
completed work items are returned asynchronously through a second queue.
|
|
|
|
In theory, this model allows extremely high throughput and very low latency.
|
|
In practice, however, structuring client code to achieve these goals remains challenging.
|
|
In our use case -- rendering video frames based on the timeline arrangement made by the
|
|
film editor -- expensive computations must be chained behind I/O operations, all together
|
|
involving a massive amount of data.
|
|
|
|
The talk discusses common solution patterns and presents the approach taken by the
|
|
<i>Lumiera</i> project to address these challenges. A simplified demonstration setup
|
|
will then be explained using code examples in C++.
|