blk-mq: allocate tags in batches for-5.6/block-test
authorJens Axboe <axboe@kernel.dk>
Mon, 30 Dec 2019 05:15:21 +0000 (22:15 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 17 Jan 2020 15:27:16 +0000 (08:27 -0700)
commit619c842f5985b0a237252cc631ee3508841dc849
treeaffdbfcc3e7c63124b1da24b370a11252735a904
parentbb2d58c57d22e4fc290f3eb6a072af09c1d7e4b6
blk-mq: allocate tags in batches

Instead of grabbing tags one by one, grab a batch and store the local
cache in the software queue. Then subsequent tag allocations can just
grab free tags from there, without having to hit the shared tag map.

We flush these batches out if we run out of tags on the hardware queue.
The intent here is this should rarely happen.

This works very well in practice, with anywhere from 40-60 batch counts
seen regularly in testing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c
block/blk-mq-tag.c
block/blk-mq-tag.h
block/blk-mq.c
block/blk-mq.h
include/linux/blk-mq.h