diff options
author | Yu Kuai <yukuai3@huawei.com> | 2022-05-13 05:35:07 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-16 20:39:20 +0300 |
commit | ddc25c86b466d2359b57bc7798f167baa1735a44 (patch) | |
tree | 42e97d04b7d1155d8c68e00b876780930ed7bc61 /block/blk-cgroup.h | |
parent | 181490d5321806e537dc5386db5ea640b826bf78 (diff) | |
download | linux-ddc25c86b466d2359b57bc7798f167baa1735a44.tar.xz |
block, bfq: make bfq_has_work() more accurate
bfq_has_work() is using busy_queues currently, which is not accurate
because bfq_queue is busy doesn't represent that it has requests. Since
bfqd aready has a counter 'queued' to record how many requests are in
bfq, use it instead of busy_queues.
Noted that bfq_has_work() can be called with 'bfqd->lock' held, thus the
lock can't be held in bfq_has_work() to protect 'bfqd->queued'.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220513023507.2625717-3-yukuai3@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
0 files changed, 0 insertions, 0 deletions