]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
blk-mq: merge bio into sw queue before plugging
authorMing Lei <ming.lei@redhat.com>
Fri, 26 May 2017 11:53:19 +0000 (19:53 +0800)
committerJens Axboe <axboe@fb.com>
Fri, 26 May 2017 20:12:03 +0000 (14:12 -0600)
commitab42f35d9cb5ac49b5a2a11f940e74f58f207280
treed3fedd45516727f64f0efa1f494755cbabd8a6cc
parentcdbe0206783b4e86abb0150303f137e448b5e531
blk-mq: merge bio into sw queue before plugging

Before blk-mq is introduced, I/O is merged to elevator
before being putted into plug queue, but blk-mq changed the
order and makes merging to sw queue basically impossible.
Then it is observed that throughput of sequential I/O is degraded
about 10%~20% on virtio-blk in the test[1] if mq-deadline isn't used.

This patch moves the bio merging per sw queue before plugging,
like what blk_queue_bio() does, and the performance regression is
fixed under this situation.

[1]. test script:
sudo fio --direct=1 --size=128G --bsrange=4k-4k --runtime=40 --numjobs=16 --ioengine=libaio --iodepth=64 --group_reporting=1 --filename=/dev/vdb --name=virtio_blk-test-$RW --rw=$RW --output-format=json

RW=read or write

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c