From: "yukuai (C)" <yukuai3@huawei.com>
To: Jan Kara <jack@suse.cz>
Cc: <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 v3 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs'
Date: Thu, 28 Apr 2022 09:09:36 +0800 [thread overview]
Message-ID: <d36b4904-3db8-537c-5040-b496272ccf70@huawei.com> (raw)
In-Reply-To: <20220427124908.o3cl72h2uflmufso@quack3.lan>
在 2022/04/27 20:49, Jan Kara 写道:
> On Wed 27-04-22 20:47:21, 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.
>>
>> 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>
>
> Looks good. Just I think you forgot to remove in_groups_with_pending_reqs,
> which is now unused, from bfq_entity.
Will remove it in the next iteration.
Thanks,
Kuai
WARNING: multiple messages have this Message-ID (diff)
From: "yukuai (C)" <yukuai3-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
Cc: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
paolo.valente-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
yi.zhang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH -next v3 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs'
Date: Thu, 28 Apr 2022 09:09:36 +0800 [thread overview]
Message-ID: <d36b4904-3db8-537c-5040-b496272ccf70@huawei.com> (raw)
In-Reply-To: <20220427124908.o3cl72h2uflmufso-/1kMjMImKQN+urZeOPWqwQ@public.gmane.org>
ÔÚ 2022/04/27 20:49, Jan Kara дµÀ:
> On Wed 27-04-22 20:47:21, 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.
>>
>> 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-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>
> Looks good. Just I think you forgot to remove in_groups_with_pending_reqs,
> which is now unused, from bfq_entity.
Will remove it in the next iteration.
Thanks,
Kuai
next prev parent reply other threads:[~2022-04-28 1:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 12:47 [PATCH -next v3 0/3] support concurrent sync io for bfq on a specail occasion Yu Kuai
2022-04-27 12:47 ` Yu Kuai
2022-04-27 12:47 ` [PATCH -next v3 1/3] block, bfq: record how many queues are busy in bfq_group Yu Kuai
2022-04-27 12:47 ` Yu Kuai
2022-04-27 12:52 ` Jan Kara
2022-04-28 1:08 ` yukuai (C)
2022-04-28 1:08 ` yukuai (C)
2022-04-27 12:47 ` [PATCH -next v3 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs' Yu Kuai
2022-04-27 12:47 ` Yu Kuai
2022-04-27 12:49 ` Jan Kara
2022-04-27 12:49 ` Jan Kara
2022-04-28 1:09 ` yukuai (C) [this message]
2022-04-28 1:09 ` yukuai (C)
2022-04-27 12:47 ` [PATCH -next v3 3/3] block, bfq: do not idle if only one group is activated Yu Kuai
2022-04-27 12:47 ` Yu Kuai
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=d36b4904-3db8-537c-5040-b496272ccf70@huawei.com \
--to=yukuai3@huawei.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=jack@suse.cz \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.