Asynchronous I/O and Coroutines for Smooth Data Streaming
summary
Linux io_uring (Linux 5.1) and C++20 coroutines are combined into a UDP-read pipeline that submits preallocated 1500‑byte buffers to the ring, receives packets with far fewer syscalls (about ~5k syscalls for 20k packets vs roughly two syscalls per packet with poll/epoll), converts span->string, concatenates into 40‑char lines and prints them. The prototype uses io_uring (Linux 5.1) and C++20 coroutines, demonstrably works, but requires ugly move‑only coroutine objects, manual lifetime management, poor cancellation support and a lot of boilerplate — pipeline worked but code is brittle.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:10Asynchronous I/O and coroutines for smooth data streaming
- 3:02Synchronous I/O with poll/read
- 25:56coroutine return object (task) cont.
- 30:19Making a computation pipeline
- 39:05pipeline as a value type
- 40:11Another level of indirection
- 42:39A little helper
- 46:13Feeding the pipeline from io_uring
- 51:41Takeaways
related talks
57mAsynchronous I/O and coroutines for smooth data streaming
06mZero-copy Transfers with io_uring and Rust
46mRevamping ioctl with io_uring
59mThe Wild West of post-POSIX IO Interfaces
45mJourney to the end of Linux IO APIs (from poll to io_uring)
51mJourney to the End of Linux IO APIs (d…)
19mExperiences With Integration of Io_uring Into gRPC-C++
19mI/O Passthru: Upstreaming a flexible and efficient I/O Path in Linux
