]> git.baikalelectronics.ru Git - kernel.git/commit
blk-iocost: clamp inuse and skip noops in __propagate_weights()
authorTejun Heo <tj@kernel.org>
Tue, 1 Sep 2020 18:52:35 +0000 (14:52 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 01:38:31 +0000 (19:38 -0600)
commit72fa1edfee520200e51b7d5f2425c5bec0c22d17
tree015107e8a4c471aa1fd872043d096ea39c835617
parentd4f8c75e0801a8d407dbe52e561480fd0f2fdd21
blk-iocost: clamp inuse and skip noops in __propagate_weights()

__propagate_weights() currently expects the callers to clamp inuse within
[1, active], which is needlessly fragile. The inuse adjustment logic is
going to be revamped, in preparation, let's make __propagate_weights() clamp
inuse on entry.

Also, make it avoid weight updates altogether if neither active or inuse is
changed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c