]> git.baikalelectronics.ru Git - kernel.git/commit
block, bfq: make sure queue budgets are not below service received
authorPaolo Valente <paolo.valente@linaro.org>
Tue, 29 Jan 2019 11:06:27 +0000 (12:06 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 31 Jan 2019 19:50:23 +0000 (12:50 -0700)
commit277664d3b6d793b780857022c000087c0385f770
tree6f5be115aed4028905240b168f8d4ab9728c519e
parentcaaa64a8b414b71430908d1decb866cc3484c085
block, bfq: make sure queue budgets are not below service received

With some unlucky sequences of events, the function bfq_updated_next_req
updates the current budget of a bfq_queue to a lower value than the
service received by the queue using such a budget. Unfortunately, if
this happens, then the return value of the function bfq_bfqq_budget_left
becomes inconsistent. This commit solves this problem by lower-bounding
the budget computed in bfq_updated_next_req to the service currently
charged to the queue.

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