diff options
author | Yu Kuai <yukuai3@huawei.com> | 2022-09-16 09:19:40 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-01 14:09:44 +0100 |
commit | eed3ecc991c90a4a0ce32ea2b35378dc351f012b (patch) | |
tree | 6332d1cdea891dbfb7911168d19b5000510a37c6 /block/bfq-iosched.c | |
parent | block, bfq: refactor the counting of 'num_groups_with_pending_reqs' (diff) | |
download | linux-eed3ecc991c90a4a0ce32ea2b35378dc351f012b.tar.xz linux-eed3ecc991c90a4a0ce32ea2b35378dc351f012b.zip |
block, bfq: do not idle if only one group is activated
Now that root group is counted into 'num_groups_with_pending_reqs',
'num_groups_with_pending_reqs > 0' is always true in
bfq_asymmetric_scenario(). Thus change the condition to '> 1'.
On the other hand, this change can enable concurrent sync io if only
one group is activated.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Paolo Valente <paolo.valente@linaro.org>
Link: https://lore.kernel.org/r/20220916071942.214222-5-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r-- | block/bfq-iosched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index d5febdb0a6c0..850becc2a522 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -820,7 +820,7 @@ bfq_pos_tree_add_move(struct bfq_data *bfqd, struct bfq_queue *bfqq) * much easier to maintain the needed state: * 1) all active queues have the same weight, * 2) all active queues belong to the same I/O-priority class, - * 3) there are no active groups. + * 3) there is at most one active group. * In particular, the last condition is always true if hierarchical * support or the cgroups interface are not enabled, thus no state * needs to be maintained in this case. @@ -852,7 +852,7 @@ static bool bfq_asymmetric_scenario(struct bfq_data *bfqd, return varied_queue_weights || multiple_classes_busy #ifdef CONFIG_BFQ_GROUP_IOSCHED - || bfqd->num_groups_with_pending_reqs > 0 + || bfqd->num_groups_with_pending_reqs > 1 #endif ; } |