Re: [PATCH] ublk: don't use an I/O scheduler by default
From: Jens Axboe
Date: Thu Oct 01 2026 - 10:49:14 EST
On Thu, 01 Oct 2026 11:10:40 +0800, Qiliang Yuan wrote:
> Requests of a ublk device are handed to the ublk server through
> io_uring, and the server does its own queueing and ordering, so an I/O
> scheduler in front of the device only adds overhead. A single-queue
> ublk device still gets mq-deadline by default, which costs throughput
> on every I/O and an elevator setup on every START_DEV.
>
> Set BLK_MQ_F_NO_SCHED_BY_DEFAULT so that add_disk() selects "none", as
> loop does since commit 2112f5c1330a ("loop: Select I/O scheduler 'none'
> from inside add_disk()"). Doing it in the kernel also avoids switching
> the scheduler from user space after the device has been added, which
> waits for RCU grace periods. A scheduler can still be selected through
> sysfs. Zoned ublk devices don't need mq-deadline either, zone write
> plugging serializes writes per zone in the block layer since
> commit fde02699c242 ("block: mq-deadline: Remove support for zone write
> locking").
>
> [...]
Applied, thanks!
[1/1] ublk: don't use an I/O scheduler by default
commit: 2b8ee88f18d410cfcda0380ad45a0b67b11dec03
Best regards,
--
Jens Axboe