]> git.baikalelectronics.ru Git - kernel.git/commit
block: avoid to quiesce queue in elevator_init_mq
authorMing Lei <ming.lei@redhat.com>
Wed, 17 Nov 2021 11:55:02 +0000 (19:55 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Nov 2021 14:43:26 +0000 (07:43 -0700)
commitaa7aa99a7a935b2613d496cc8cbc2089100cee6a
tree486d0e18d313c6fba0f2661108c779ce6e7885ea
parentdbb26410096081b94904bf799614452d42e21c76
block: avoid to quiesce queue in elevator_init_mq

elevator_init_mq() is only called before adding disk, when there isn't
any FS I/O, only passthrough requests can be queued, so freezing queue
plus canceling dispatch work is enough to drain any dispatch activities,
then we can avoid synchronize_srcu() in blk_mq_quiesce_queue().

Long boot latency issue can be fixed in case of lots of disks added
during booting.

Fixes: e78b887293f1 ("block: Delay default elevator initialization")
Reported-by: yangerkun <yangerkun@huawei.com>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20211117115502.1600950-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/elevator.c