blk-mq: honor IO scheduler for multiqueue devices
commita12de1d42d74ef3c80e9fb9a2da94daaef747869
authorMing Lei <ming.lei@redhat.com>
Fri, 27 Sep 2019 07:24:30 +0000 (27 15:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 27 Sep 2019 17:38:28 +0000 (27 11:38 -0600)
tree730e2f9be02fa7087af02e7b9d825dc7a3b2b3b0
parent8d6996630c03d7ceeabe2611378fea5ca1c3f1b3
blk-mq: honor IO scheduler for multiqueue devices

If a device is using multiple queues, the IO scheduler may be bypassed.
This may hurt performance for some slow MQ devices, and it also breaks
zoned devices which depend on mq-deadline for respecting the write order
in one zone.

Don't bypass io scheduler if we have one setup.

This patch can double sequential write performance basically on MQ
scsi_debug when mq-deadline is applied.

Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Javier González <javier@javigon.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c