]> git.baikalelectronics.ru Git - kernel.git/commit
block, bfq: fix service being wrongly set to zero in case of preemption
authorPaolo Valente <paolo.valente@linaro.org>
Mon, 25 Jun 2018 19:55:36 +0000 (21:55 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:52 +0000 (09:07 -0600)
commit1341f0701f17f00b3747eb7d9c67db878e03f2c8
tree9a92db835315bb2cac28e4b3489b824a92e93157
parent685c1be55fd04a1c1ddf781d56251d8a8099c7a2
block, bfq: fix service being wrongly set to zero in case of preemption

If
- a bfq_queue Q preempts another queue, because one request of Q
arrives in time,
- but, after this preemption, Q is not the queue that is set in service,
then Q->entity.service is set to 0 when Q is eventually set in
service. But Q should have continued receiving service with its old
budget (which is why preemption has occurred) and its old service.

This commit addresses this issue by resetting service on queue real
expiration.

Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/bfq-wf2q.c