summaryrefslogtreecommitdiff
path: root/block/blk-mq-cpumap.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2021-06-18 04:59:22 +0300
committerJens Axboe <axboe@kernel.dk>2021-06-18 17:51:48 +0300
commite42cfb1da0bf33c313318da201730324c423351d (patch)
tree53fc872475028ef3bce42e418c791c2ede206f4d /block/blk-mq-cpumap.c
parentf0c1c4d2864ed614f90d2da1bab1a1c42907b940 (diff)
downloadlinux-e42cfb1da0bf33c313318da201730324c423351d.tar.xz
block: Remove unnecessary elevator operation checks
The insert_requests and dispatch_request elevator operations are mandatory for the correct execution of an elevator, and all implemented elevators (bfq, kyber and mq-deadline) implement them. As a result, there is no need to check for these operations before calling them when a queue has an elevator set. This simplifies the code in __blk_mq_sched_dispatch_requests() and blk_mq_sched_insert_request(). To avoid out-of-tree elevators to crash the kernel in case of bad implementation, add a check in elv_register() to verify that these operations are implemented. A small, probably not significant, IOPS improvement of 0.1% is observed with this patch applied (4.117 MIOPS to 4.123 MIOPS, average of 20 fio runs doing 4K random direct reads with psync and 32 jobs). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20210618015922.713999-1-damien.lemoal@wdc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-cpumap.c')
0 files changed, 0 insertions, 0 deletions