IO_uring Continues To Prove Very Exciting: Promising io_uring_spawn Announced

Written by Michael Larabel in Linux Kernel on 13 September 2022 at 06:25 AM EDT. 29 Comments
LINUX KERNEL
IO_uring continues to prove itself to be one of the most exciting fundamental innovations to the Linux kernel of the past decade. While started for async storage I/O, it has seen recent work around networking use-cases and also driving other innovations like the new "UBD" driver for a IO_uring-based user-space block driver. It also continues to be relentlessly optimized by Jens Axboe and others for maximum performance potential. The latest innovation around IO_uring that was announced this week at Linux Plumbers Conference 2022 in Dublin is io_uring_spawn.

Josh Triplett, who is a former notable Intel Linux engineer and more recently focused on the Rust programming language where he co-leads the Rust language team, announced his work on io_uring_spawn yesterday at LPC 2022. Triplett sums it up pretty elegantly in his talk abstract:
io_uring allows running a batch of operations fast, on behalf of the current process. As the name suggests, this works exceptionally well for I/O workloads. However, one of the most prominent workloads in software development involves executing other processes: make and other build systems launch many other processes over the course of a build. How can we launch those processes faster?

What if we could launch other processes, and give them initial work to do using io_uring, ending with an exec? What if we could handle the pre-exec steps for a new process entirely in the kernel, with no userspace required, eliminating the need for fork or even vfork, and eliminating page-table CoW overhead?

In this talk, I'll introduce io_uring_spawn, a mechanism for launching empty new processes with an associated io_uring. I'll show how the kernel can launch a blank process, with no initial copy-on-write page tables, and initialize all of its resources from an io_uring. I'll walk through both the successful path and the error-handling path, and show how to get information about the launched process. Finally, I'll show how existing userspace can take advantage of io_uring_spawn to speed up posix_spawn, and provide performance numbers for common workloads, including kernel compilation.

Indeed his benchmark results speak for themselves with io_uring_spawn being much faster than fork or posix_spawn and even 6~10% faster than vfork while being attributed as safer and more flexible.


Josh Triplett's work on io_uring_spawn is looking very exciting but still in the early stages of the implementation.


This is a very promising start to io_uring_spawn to which he says he's "just getting started". He's looking forward to next implementing posix_spawn atop it, supporting a pre-spawned process pool, and optimizing clone further. Those wishing to learn much more about this promising io_uring_spawn work can see Josh Tripplett's presentation below and the PDF slide deck.

Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week