[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220428112334.um5mnmxmm2y2oqqf@quack3.lan>
Date: Thu, 28 Apr 2022 13:23:34 +0200
From: Jan Kara <jack@...e.cz>
To: Yu Kuai <yukuai3@...wei.com>
Cc: jack@...e.cz, tj@...nel.org, axboe@...nel.dk,
paolo.valente@...aro.org, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com
Subject: Re: [PATCH -next v4 2/3] block, bfq: refactor the counting of
'num_groups_with_pending_reqs'
On Thu 28-04-22 19:19:06, Yu Kuai wrote:
> Currently, bfq can't handle sync io concurrently as long as they
> are not issued from root group. This is because
> 'bfqd->num_groups_with_pending_reqs > 0' is always true in
> bfq_asymmetric_scenario().
>
> The way that bfqg is counted into 'num_groups_with_pending_reqs':
>
> Before this patch:
> 1) root group will never be counted.
> 2) Count if bfqg or it's child bfqgs have pending requests.
> 3) Don't count if bfqg and it's child bfqgs complete all the requests.
>
> After this patch:
> 1) root group is counted.
> 2) Count if bfqg have at least one bfqq that is marked busy.
> 3) Don't count if bfqg doesn't have any busy bfqqs.
>
> The main reason to use busy state of bfqq instead of 'pending requests'
> is that bfqq can stay busy after dispatching the last request if idling
> is needed for service guarantees.
>
> With this change, the occasion that only one group is activated can be
> detected, and next patch will support concurrent sync io in the
> occasion.
>
> This patch also rename 'num_groups_with_pending_reqs' to
> 'num_groups_with_busy_queues'.
>
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
> block/bfq-iosched.c | 46 ++-----------------------------------
> block/bfq-iosched.h | 55 ++++++---------------------------------------
> block/bfq-wf2q.c | 19 ++++------------
> 3 files changed, 13 insertions(+), 107 deletions(-)
I love the diffstat :)
> + * Number of groups with at leaset one bfqq that is marked busy,
^^^^^ least
Otherwise the patch looks good so feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists