Re: [PATCH] blk-mq: run the hw queue synchronously for unplugged scheduler inserts
From: Qiliang Yuan
Date: Wed Oct 14 2026 - 22:20:32 EST
Hi Ming,
On Fri, Oct 09, 2026 at 10:05:59PM -0500, Ming Lei wrote:
> It is hard to say it is one regression cause 9cbbac29d752 is doing correct
> thing, and single request isn't supposed to dispatch via plug list, and it
> only recovers to previous behavior before 060406c61c7c
> ("block: add plug while submitting IO").
Agreed that 9cbbac29d752 itself is right, and this patch doesn't bring
the plug back. What differs from the time before 060406c61c7c is how
the async run gets scheduled: on v6.9 with PREEMPT_NONE the submitter
context switched 0.23 times per I/O, so one run of kblockd still
dispatched several requests, while on v7.3 with PREEMPT_LAZY the
kworker preempts the submitter once per I/O.
> Not sure you can observe big difference for other real SQ device.
Here is a virtio-blk disk with a single queue, which gets mq-deadline
by default, in a 16 vCPU KVM guest with the backing file in host
memory. fio, io_uring, 4k, median of 3 runs:
v7.3-rc5 patched
randread, qd16 89.3K 162.8K
randwrite, qd16 86.3K 156.7K
randread, qd1 14.3K 14.9K
psync randread 14.3K 14.9K
ctx switches/IO, qd16 0.99 0.04
With none instead of mq-deadline the disk does 163K-177K random reads
at qd16 on both kernels, so the patch brings mq-deadline close to none
and leaves none alone.
> For both SQ null & ublk, you can switch to none for better performance.
Right, and ublk now defaults to none. But mq-deadline is still the
default for every other single-queue device, and few users change it.
Thanks,
Qiliang