From: Ming Lei <tom.leiming@gmail.com>
To: Qiliang Yuan <odys.yuan@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ublk: don't use an I/O scheduler by default
Date: Thu, 1 Oct 2026 04:26:43 -0500 [thread overview]
Message-ID: <ar4nU5bVWKdBZXsB@fedora-laptop> (raw)
In-Reply-To: <20261001-bug-ublk-no-sched-by-default-v1-1-0bc91b6f075e@gmail.com>
On Thu, Oct 01, 2026 at 11:10:40AM +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").
>
> ublk null target, single-queue devices with depth 16, fio io_uring 4k
> randread at iodepth=16, 16 vCPU KVM guest:
>
> mq-deadline none
> 1 device 111K IOPS 342K IOPS
> 4 devices 286K IOPS 1070K IOPS
> START_DEV p50 (1000 devices) 8.53ms 0.36ms
>
> Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
Default none does make sense:
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
> ---
> Zoned ublk devices were not tested at runtime: none of the ublk servers
> at hand (ublksrv, the kublk selftest server) serves zoned I/O.
rublk supports zoned:
`cargo install rublk` or https://github.com/ublk-org/rublk
Thanks,
Ming
next prev parent reply other threads:[~2026-10-01 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 3:10 [PATCH] ublk: don't use an I/O scheduler by default Qiliang Yuan
2026-10-01 9:26 ` Ming Lei [this message]
2026-10-01 14:43 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ar4nU5bVWKdBZXsB@fedora-laptop \
--to=tom.leiming@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=odys.yuan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.