diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-01-18 10:34:16 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-13 19:08:22 -0600 |
commit | 77f1e0a52d26242b6c2dba019f6ebebfb9ff701e (patch) | |
tree | d813fd9cdf53b7d1351f885e2c8706719672fba4 /include/linux/elevator.h | |
parent | 917257daa0fea7a007102691c0e27d9216a96768 (diff) | |
download | talos-op-linux-77f1e0a52d26242b6c2dba019f6ebebfb9ff701e.tar.gz talos-op-linux-77f1e0a52d26242b6c2dba019f6ebebfb9ff701e.zip |
bfq: update internal depth state when queue depth changes
A previous commit moved the shallow depth and BFQ depth map calculations
to be done at init time, moving it outside of the hotter IO path. This
potentially causes hangs if the users changes the depth of the scheduler
map, by writing to the 'nr_requests' sysfs file for that device.
Add a blk-mq-sched hook that allows blk-mq to inform the scheduler if
the depth changes, so that the scheduler can update its internal state.
Tested-by: Kai Krakow <kai@kaishome.de>
Reported-by: Paolo Valente <paolo.valente@linaro.org>
Fixes: f0635b8a416e ("bfq: calculate shallow depths at init time")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 2e9e2763bf47..6e8bc53740f0 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -31,6 +31,7 @@ struct elevator_mq_ops { void (*exit_sched)(struct elevator_queue *); int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int); void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); + void (*depth_updated)(struct blk_mq_hw_ctx *); bool (*allow_merge)(struct request_queue *, struct request *, struct bio *); bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *); |