From: Yu Kuai <yukuai3@xxxxxxxxxx> Backgroud and motivation: At first, we test a performance regression from 5.10 to 6.6 in downstream kernel(described in patch 13), the regression is related to async_depth in mq-dealine. While trying to fix this regression, Bart suggests add a new attribute to request_queue, and I think this is a good idea because all elevators have similar logical, however only mq-deadline allow user to configure async_depth. And this is patch 9-16, where the performance problem is fixed in patch 13; Because async_depth is related to nr_requests, while reviewing related code, patch 2-7 are cleanups and fixes to nr_reqeusts. I was planning to send this set for the next merge window, however, during test I found the last block pr(6.17-rc1) introduce a regression if nr_reqeusts grows, exit elevator will panic, and I fix this by patch 1,8. So I send this set for now, and hope we can consider it for this merge window. If not, I'll have to rework the whole set and send the second kernel panic regression first. Yu Kuai (16): blk-mq-sched: add new parameter nr_requests in blk_mq_alloc_sched_tags() blk-mq: remove useless checking from queue_requests_store() blk-mq: remove useless checkings from blk_mq_update_nr_requests() blk-mq: check invalid nr_requests in queue_requests_store() blk-mq: fix elevator depth_updated method blk-mq: cleanup shared tags case in blk_mq_update_nr_requests() blk-mq: split bitmap grow and resize case in blk_mq_update_nr_requests() blk-mq: fix blk_mq_tags double free while nr_requests grown block: convert nr_requests to unsigned int blk-mq-sched: unify elevators checking for async requests blk-mq: add a new queue sysfs attribute async_depth kyber: covert to use request_queue->async_depth mq-deadline: covert to use request_queue->async_depth block, bfq: convert to use request_queue->async_depth blk-mq: fix stale nr_requests documentation blk-mq: add documentation for new queue attribute async_dpeth Documentation/ABI/stable/sysfs-block | 24 ++++--- block/bfq-iosched.c | 64 +++++++------------ block/blk-core.c | 1 + block/blk-mq-sched.c | 14 +++-- block/blk-mq-sched.h | 18 +++++- block/blk-mq-tag.c | 23 +------ block/blk-mq.c | 93 +++++++++++++++++----------- block/blk-mq.h | 2 +- block/blk-sysfs.c | 63 ++++++++++++++++++- block/elevator.c | 3 +- block/elevator.h | 2 +- block/kyber-iosched.c | 40 ++---------- block/mq-deadline.c | 55 ++-------------- include/linux/blkdev.h | 3 +- 14 files changed, 194 insertions(+), 211 deletions(-) -- 2.39.2