Experimental "UBD" Driver Posted As IO_uring-Based User-Space Block Driver

Written by Michael Larabel in Linux Storage on 10 May 2022 at 05:28 AM EDT. 4 Comments
LINUX STORAGE
Ming Lei of Red Hat has published an early implementation of a IO_uring based user-space block driver for Linux.

The request for comments was sent out on Monday for "UBD" as a IO_uring user-space block driver. This UBD driver goes along with the "UBDSRV" user-space daemon written by Ming Lei as well.

Ming explained of UBD:
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 ubdsrv, each io command is indexed by io request tag directly, and is written by ubd driver.

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

After ubdsrv gets the io command, it translates and handles the ubd io request, such as, for the ubd-loop target, ubdsrv translates the request into same request on another file or disk, like the kernel loop block driver. In ubdsrv'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 ubd driver for both committing io request result and getting future notification of new io request.

Zero-copy support for the UBD driver is one of the big features still to be pursued.

See this patch for more details on this user-space block driver effort out of Red Hat. The UBD user-space daemon is hosted on GitHub. It will be interesting to see how this user-space block driver evolves and what sort of adoption it may see.
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