IO_uring Zerocopy Send Is Ready For Linux 5.20 Networking

Written by Michael Larabel in Linux Networking on 20 July 2022 at 05:52 AM EDT. 8 Comments
The long in development work around IO_uring zero-copy send for the Linux kernel's networking subsystem is now ready for mainline.

For months Pavel Begunkov has been working on IO_uring zero-copy send support and now it's all buttoned up and ready to be merged come Linux 5.20. The benchmarks have been looking great and the code is now mature enough for mainline.

As of yesterday the "io_uring-zerocopy-send" support was queued into net-next as the networking subsystem code for the next kernel merge window.
The patchset implements io_uring zerocopy send. It works with both registered and normal buffers, mixing is allowed but not recommended. Apart from usual request completions, just as with MSG_ZEROCOPY, io_uring separately notifies the userspace when buffers are freed and can be reused (see API design below), which is delivered into io_uring's Completion Queue. Those "buffer-free" notifications are not necessarily per request, but the userspace has control over it and should explicitly attaching a number of requests to a single notification. The series also adds some internal optimisations when used with registered buffers like removing page referencing.

From the kernel networking perspective there are two main changes. The first one is passing ubuf_info into the network layer from io_uring (inside of an in kernel struct msghdr). This allows extra optimisations, e.g. ubuf_info caching on the io_uring side, but also helps to avoid cross-referencing and synchronisation problems. The second part is an optional optimisation removing page referencing for requests with registered buffers.

Queued via for-5.20/io_uring-zerocopy-send are the IO_uring side changes queued up by maintainer Jens Axboe. Linux 5.20 is shaping up to be a big kernel.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week