Linux’s user-space block device driver framework “ublk” for implementing virtual block device drivers in user-space relayed by IO_uring is introducing batch I/O dispatch infrastructure.
This code on the way to the mainline kernel for Linux 7.0 allows for delivering I/O commands to the ublk user-space server in batches. By batching the I/O, there is “significantly” reduced notification overhead by allowing multiple I/O completions within a single uring_cmd.
The patch series notes for 16 jobs I/O involving page copies the performance improved in tests by 12% or around 3.7% when using zero-copy. Or for single job I/O was still around a 2.3% improvement with page copies or up to 7% with zero-copy behavior.
“This patchset adds UBLK_F_BATCH_IO feature for communicating between kernel and ublk server in batching way:
– Per-queue vs Per-I/O: Commands operate on queues rather than individual I/Os
– Batch processing: Multiple I/Os are handled in single operation
– Multishot commands: Use io_uring multishot for reducing submission overhead
– Flexible task assignment: Any task can handle any I/O (no per-I/O daemons)
– Better load balancing: Tasks can adjust their workload dynamically
– help for future optimizations:
– blk-mq batch tags free
– support io-poll
– per-task batch for avoiding per-io lock
– fetch command priority– simplify command cancel process with per-queue lock”
The work is queued up in Jens Axboe’s “for-next” Git branch thus on track for the Linux 6.20~7.0 kernel merge window in February barring any unexpected issues.
