[Devel] [PATCH hci-8.2 9/9] dm: default dm-qcow2 devices to no I/O scheduler
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:39:48 MSK 2026
> From: Denis V. Lunev <den at openvz.org>
>
> Request-based dm has one hardware queue by default, so it gets
> mq-deadline. On that queue mq-deadline caps requests in flight at 256
> by default (2 * min(depth, BLKDEV_DEFAULT_RQ)) and serialises insert
> and dispatch on its lock. The cost grows with queue depth and the
> number of submitters. Sorting by device sector buys little for dm-qcow2
> because adjacent guest sectors can be far apart in the image, and the
> backing device can schedule the image I/O itself.
>
> Set DM_TARGET_NO_SCHED_BY_DEFAULT on dm-qcow2. When the target in the
> initial request-based table has this flag, dm_mq_init_request_queue()
> sets BLK_MQ_F_NO_SCHED_BY_DEFAULT, as loop does, so elevator_set_default()
> leaves the device with none.
>
> mq-deadline arbitrates between I/O priority classes at dispatch. With
> none, the dm device loses that arbitration. dm-qcow2 issues image I/O
> from its workers, so the request's priority class does not reach the
> backing device either. mq-deadline can still be selected through sysfs.
>
> libploop creates qcow2 devices and ploop_dmcreate_stub() devices with a
> zero-rq table and loads the real table later. Set the flag on zero-rq
> as well because the scheduler is chosen when the device is created.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-95494
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Denis V. Lunev <den at openvz.org>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261125012525.681662-1-den@openvz.org?part=9
More information about the Devel
mailing list