WIP io_uring spawn (see commit message for status)
This is the work-in-progress attempt at implementing clone and exec
operations for io_uring. The idea is to submit a series of linked
operations that io_uring will run on a freshly cloned process, which
ends with one or more exec operations. io_uring will run the whole
series of operations, and either successfully exec or terminate the
process, without ever returning to "userspace" (since the new process
didn't have a userspace to begin with). This would allow performing an
entire spawn operation in io_uring (e.g. clone, rearrange file
descriptors, exec).
Current state: this functions enough to get lots of processes launched,
but in the process, does something that corrupts the kernel state enough
to cause subsequent errors. Try launching lots of processes, then
exiting. Watch for errors in the kernel log as well. This needs
debugging.
For a patched version of liburing, see the `spawn` branch of
https://github.com/joshtriplett/liburing/
For userspace test code, see https://github.com/joshtriplett/spawnbench/
and note that that requires running a patched kernel *and* having a
build of the patched liburing at `/tmp/liburing-spawn`. Yes, this is a
hack.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
9 files changed