Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ming Lei and committed by
Jens Axboe
a12de1d4 8d699663

+4 -2
+4 -2
block/blk-mq.c
··· 2012 2012 } 2013 2013 2014 2014 blk_add_rq_to_plug(plug, rq); 2015 + } else if (q->elevator) { 2016 + blk_mq_sched_insert_request(rq, false, true, true); 2015 2017 } else if (plug && !blk_queue_nomerges(q)) { 2016 2018 /* 2017 2019 * We do limited plugging. If the bio can be merged, do that. ··· 2037 2035 blk_mq_try_issue_directly(data.hctx, same_queue_rq, 2038 2036 &cookie); 2039 2037 } 2040 - } else if ((q->nr_hw_queues > 1 && is_sync) || (!q->elevator && 2041 - !data.hctx->dispatch_busy)) { 2038 + } else if ((q->nr_hw_queues > 1 && is_sync) || 2039 + !data.hctx->dispatch_busy) { 2042 2040 blk_mq_try_issue_directly(data.hctx, rq, &cookie); 2043 2041 } else { 2044 2042 blk_mq_sched_insert_request(rq, false, true, true);