]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/bfq-iosched.c
block,bfq: refactor device-idling logic
authorPaolo Valente <paolo.valente@linaro.org>
Fri, 4 Aug 2017 05:35:10 +0000 (07:35 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Aug 2017 14:58:02 +0000 (08:58 -0600)
commitd5be3fefc9e2db68eacfc7cfe265e2e860e4213f
tree60088e9b8c13acbc492b880ffddc310593f5ed8f
parente743eb1ecd5564b5ae0a4a76c1566f748a358839
block,bfq: refactor device-idling logic

The logic that decides whether to idle the device is scattered across
three functions. Almost all of the logic is in the function
bfq_bfqq_may_idle, but (1) part of the decision is made in
bfq_update_idle_window, and (2) the function bfq_bfqq_must_idle may
switch off idling regardless of the output of bfq_bfqq_may_idle. In
addition, both bfq_update_idle_window and bfq_bfqq_must_idle make
their decisions as a function of parameters that are used, for similar
purposes, also in bfq_bfqq_may_idle. This commit addresses these
issues by moving all the logic into bfq_bfqq_may_idle.

Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/bfq-iosched.h