]> git.baikalelectronics.ru Git - kernel.git/commit
bfq: update internal depth state when queue depth changes
authorJens Axboe <axboe@kernel.dk>
Fri, 18 Jan 2019 17:34:16 +0000 (10:34 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 14 Apr 2019 01:08:22 +0000 (19:08 -0600)
commitc7410d79e3eb9697492499a7c301815e62917261
treed813fd9cdf53b7d1351f885e2c8706719672fba4
parentbbd1dc597beb5c27dc71f4ae22d666948a5797d5
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: db551b5604e5 ("bfq: calculate shallow depths at init time")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/blk-mq.c
include/linux/elevator.h