A set of patches implementing async I/O IOCB_NOWAIT support for the loop block device is heading to the Linux 6.19 kernel with some performance improvements that will make loop block device users “wow”.
Jens Axboe last week queued up the patches into the Linux block subsystem’s “for-next” Git branch ahead of the Linux 6.19 merge window in early December. The merge message sums it up and the performance impact rather well:
“This patchset improves loop aio perf by using IOCB_NOWAIT for avoiding to queue aio command to workqueue context, meantime refactor lo_rw_aio() a bit.
In my test VM, loop disk perf becomes very close to perf of the backing block device(nvme/mq virtio-scsi).
And Mikulas verified that this way can improve 12jobs sequential readwrite io by ~5X, and basically solve the reported problem together with loop MQ change.
Zhaoyang Huang also mentioned it may fix their performance issue on Android use case.
The loop MQ change will be posted as standalone patch, because it needs UAPI change.”
Getting a loop disk close to the performance of the backing block device and also achieving around 5x the performance for sequential read/write is pretty enticing…
With loop block devices being used for application/software isolation like Snaps, mounting disk images, and other use-cases, this is a very welcome performance win.
Barring any last minute surprises, look for this loop block device improvement with the Linux 6.19 kernel.
