IO_uring User-Space Block Driver Coming For Linux 5.20

Written by Michael Larabel in Linux Storage on 15 July 2022 at 05:05 AM EDT. 8 Comments
Coming for the Linux 5.20 cycle is a IO_uring user-space block driver developed by a Red Hat engineer.

As of yesterday Linux block maintainer Jens Axboe has queued up "ublk_drv" as this IO_uring-based user-space block driver. This goes back to the work written about earlier this year as a user-space block driver started by Red Hat. There is also an adjoining user-space daemon as part of this effort.

For Linux 5.20 this is driver is being marked as experimental as the user-space interface and command data definition isn't definitively finalized yet. The commit explains this new driver as:
The two parts communicate by io_uring's IORING_OP_URING_CMD with one shared cmd buffer for storing io command, and the buffer is read only for ublksrv, each io command is indexed by io request tag directly, and is written by ublk driver.

For example, when one READ io request is submitted to ublk block driver, ublk driver stores the io command into cmd buffer first, then completes one IORING_OP_URING_CMD for notifying ublksrv, and the URING_CMD is issued to ublk driver beforehand by ublksrv for getting notification of any new io request, and each URING_CMD is associated with one io request by tag.

After ublksrv gets the io command, it translates and handles the ublk io request, such as, for the ublk-loop target, ublksrv translates the request into same request on another file or disk, like the kernel loop block driver. In ublksrv's implementation, the io is still handled by io_uring, and share same ring with IORING_OP_URING_CMD command. When the target io request is done, the same IORING_OP_URING_CMD is issued to ublk driver for both committing io request result and getting future notification of new io request.

The UBDSRV daemon is available from GitHub.

Axboe tweeted that in his testing of this user-space block driver he was able to get 1M IOPS out-of-the-box on some quick tests from his laptop.
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