mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Yu Kuai <yukuai3@huawei.com>
Cc: jack@suse.cz, tj@kernel.org, axboe@kernel.dk,
	paolo.valente@linaro.org, cgroups@vger.kernel.org,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com
Subject: Re: [PATCH -next v4 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs'
Date: Thu, 28 Apr 2022 13:23:34 +0200	[thread overview]
Message-ID: <20220428112334.um5mnmxmm2y2oqqf@quack3.lan> (raw)
In-Reply-To: <20220428111907.3635820-3-yukuai3@huawei.com>

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@huawei.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@suse.cz>

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2022-04-28 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 11:19 [PATCH -next v4 0/3] support concurrent sync io for bfq on a specail occasion Yu Kuai
2022-04-28 11:19 ` [PATCH -next v4 1/3] block, bfq: record how many queues are busy in bfq_group Yu Kuai
2022-04-28 11:18   ` Jan Kara
2022-04-28 11:27     ` yukuai (C)
2022-04-28 11:19 ` [PATCH -next v4 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs' Yu Kuai
2022-04-28 11:23   ` Jan Kara [this message]
2022-04-28 11:19 ` [PATCH -next v4 3/3] block, bfq: do not idle if only one group is activated Yu Kuai
2022-04-28 11:24   ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428112334.um5mnmxmm2y2oqqf@quack3.lan \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=tj@kernel.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®