All of lore.kernel.org
 help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>, <linux-block@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 1/3] block, bfq: do not idle if only one cgroup is activated
Date: Tue, 3 Aug 2021 19:30:40 +0800	[thread overview]
Message-ID: <1fe2b6cb-d770-d53f-2a17-fdce480d7be0@huawei.com> (raw)
In-Reply-To: <8D4774E6-0DEB-4DC4-B28B-13F5A933E12F@linaro.org>

On 2021/08/03 15:07, Paolo Valente wrote:
> 
> 
>> Il giorno 31 lug 2021, alle ore 09:10, yukuai (C) <yukuai3@huawei.com> ha scritto:
>>
>> On 2021/07/24 15:12, Paolo Valente wrote:
>>>> Il giorno 14 lug 2021, alle ore 11:45, Yu Kuai <yukuai3@huawei.com> ha scritto:
>>>>
>>>> If only one group is activated, specifically
>>>> 'bfqd->num_groups_with_pending_reqs == 1', there is no need to guarantee
>>>> the same share of the throughput of queues in the same group.
>>>>
>>>> Thus change the condition from '> 0' to '> 1' in
>>>> bfq_asymmetric_scenario().
>>> I see your point, and I agree with your goal.  Yet, your change seems
>>> not to suffer from the following problem.
>>> In addition to the groups that are created explicitly, there is the
>>> implicit root group.  So, when bfqd->num_groups_with_pending_reqs ==
>>> 1, there may be both active processes in the root group and active
>>> processes in the only group created explicitly.  In this case, idling
>>> is needed to preserve service guarantees.
>>> Probably your idea should be improved by making sure that there is
>>> pending I/O only from either the root group or the explicit group.
>>> Thanks,
>>> Paolo
>>
>>
>> Hi, Paolo
>>
> 
> Hi
> 
>> I'm trying to add support to judge if root group have pending rqs, the
>> implementation involve setting and clearing the busy state.
>>
> 
> I wouldn't use the busy state, as it does not take in-flight requests
> into account.  For I/O control, the latter are as important as the
> ones still queued in the scheduler.  For this reason, I take in-flight
> requests into account when counting
> bfqd->num_groups_with_pending_reqs.
> 
> See, e.g., this
> 
> 	if (!bfqq->dispatched && !bfq_bfqq_busy(bfqq)) {
> 		...
> 		bfq_weights_tree_remove(bfqd, bfqq);
> 	}
> 
> in bfq_completed_request.
> 
> I would replicate the same logic in deciding whether the root group
> has pending I/O.
> 

Hi, Paolo

Thanks for your advice, I'll send a new patchset soon.

Kuai

  reply	other threads:[~2021-08-03 11:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  9:45 [PATCH 0/3] optimize the queue idle judgment Yu Kuai
2021-07-14  9:45 ` [PATCH 1/3] block, bfq: do not idle if only one cgroup is activated Yu Kuai
2021-07-24  7:12   ` Paolo Valente
2021-07-26  1:15     ` yukuai (C)
2021-07-31  7:10     ` yukuai (C)
2021-08-03  7:07       ` Paolo Valente
2021-08-03 11:30         ` yukuai (C) [this message]
2021-07-14  9:45 ` [PATCH 2/3] block, bfq: add support to record request size information Yu Kuai
2021-07-14  9:45 ` [PATCH 3/3] block, bfq: consider request size in bfq_asymmetric_scenario() Yu Kuai
2021-07-20 12:33 ` [PATCH 0/3] optimize the queue idle judgment yukuai (C)

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=1fe2b6cb-d770-d53f-2a17-fdce480d7be0@huawei.com \
    --to=yukuai3@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.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.