summaryrefslogtreecommitdiff
path: root/block/blk-iolatency.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2022-05-13 10:35:07 +0800
committerJens Axboe <axboe@kernel.dk>2022-05-16 11:39:20 -0600
commitddc25c86b466d2359b57bc7798f167baa1735a44 (patch)
tree42e97d04b7d1155d8c68e00b876780930ed7bc61 /block/blk-iolatency.c
parent181490d5321806e537dc5386db5ea640b826bf78 (diff)
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-iolatency.c')
0 files changed, 0 insertions, 0 deletions