On 6/17/21 6:59 PM, Damien Le Moal wrote: > 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). Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>