blk-mq: Use request queue-wide tags for tagset-wide sbitmap
The tags used for an IO scheduler are currently per hctx. As such, when q->nr_hw_queues grows, so does the request queue total IO scheduler tag depth. This may cause problems for SCSI MQ HBAs whose total driver depth is fixed. Ming and Yanhui report higher CPU usage and lower throughput in scenarios where the fixed total driver tag depth is appreciably lower than the total scheduler tag depth: https://lore.kernel.org/linux-block/440dfcfc-1a2c-bd98-1161-cec4d78c6dfc@huawei.com/T/#mc0d6d4f95275a2743d1c8c3e4dc9ff6c9aa3a76b In that scenario, since the scheduler tag is got first, much contention is introduced since a driver tag may not be available after we have got the sched tag. Improve this scenario by introducing request queue-wide tags for when a tagset-wide sbitmap is used. The static sched requests are still allocated per hctx, as requests are initialised per hctx, as in blk_mq_init_request(..., hctx_idx, ...) -> set->ops->init_request(..,...
Showing
- block/blk-mq-sched.c 54 additions, 13 deletionsblock/blk-mq-sched.c
- block/blk-mq-sched.h 2 additions, 0 deletionsblock/blk-mq-sched.h
- block/blk-mq-tag.c 5 additions, 6 deletionsblock/blk-mq-tag.c
- block/blk-mq.c 11 additions, 2 deletionsblock/blk-mq.c
- include/linux/blkdev.h 4 additions, 0 deletionsinclude/linux/blkdev.h
Please register or sign in to comment