Commit 77f1e0a
committed
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: f0635b8 ("bfq: calculate shallow depths at init time")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 917257d commit 77f1e0a
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5396 | 5396 | | |
5397 | 5397 | | |
5398 | 5398 | | |
5399 | | - | |
| 5399 | + | |
5400 | 5400 | | |
5401 | 5401 | | |
5402 | 5402 | | |
5403 | 5403 | | |
5404 | 5404 | | |
5405 | 5405 | | |
5406 | 5406 | | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
| 5411 | + | |
5407 | 5412 | | |
5408 | 5413 | | |
5409 | 5414 | | |
| |||
5826 | 5831 | | |
5827 | 5832 | | |
5828 | 5833 | | |
| 5834 | + | |
5829 | 5835 | | |
5830 | 5836 | | |
5831 | 5837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
| 3138 | + | |
| 3139 | + | |
3138 | 3140 | | |
3139 | 3141 | | |
3140 | 3142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments