blk-mq-sched: fix performance regression of mq-deadline
authorMing Lei <ming.lei@redhat.com>
Mon, 3 Jul 2017 12:37:14 +0000 (20:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2017 22:54:09 +0000 (16:54 -0600)
commit32825c45ff8f4cce937ab85b030dc693ceb1aa0a
tree80f95c39f30fdec2d3d996723ca61594bd2562aa
parent431b17f9d5453533cba7d73e7e40428e4f90b35d
blk-mq-sched: fix performance regression of mq-deadline

When mq-deadline is taken, IOPS of sequential read and
seqential write is observed more than 20% drop on sata(scsi-mq)
devices, compared with using 'none' scheduler.

The reason is that the default nr_requests for scheduler is
too big for small queuedepth devices, and latency is increased
much.

Since the principle of taking 256 requests for mq scheduler
is based on 128 queue depth, this patch changes into
double size of min(hw queue_depth, 128).

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.c