From: Yu Kuai <yukuai3@huawei.com>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jan Kara <jack@suse.cz>, Tejun Heo <tj@kernel.org>,
Jens Axboe <axboe@kernel.dk>, <cgroups@vger.kernel.org>,
linux-block <linux-block@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH -next v6 1/3] block, bfq: record how many queues are busy in bfq_group
Date: Sat, 28 May 2022 16:37:07 +0800 [thread overview]
Message-ID: <7628f927-7131-5e7f-33d9-6029dada57fe@huawei.com> (raw)
In-Reply-To: <8D29A46A-4B8A-4F05-BCE3-D9D0F0D2DD5A@linaro.org>
在 2022/05/28 16:18, Paolo Valente 写道:
>
>> /*
>> @@ -1660,6 +1678,7 @@ void bfq_del_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq,
>> bfq_clear_bfqq_busy(bfqq);
>>
>> bfqd->busy_queues[bfqq->ioprio_class - 1]--;
>> + bfq_inc_busy_queues(bfqq);
>>
>
> Why do you increment the number of busy queues for the group on a
> del_bfqq_busy, instead of an add_bfqq_busy?
Hi, Paolo
You'are right, here should be bfq_dec_busy_queues()...
>
> Besides, the name of the function bfq_inc_busy_queues does not mention
> the target of the update, namely the group. This creates a little
> confusion at a first sight, as one sees this function invoked right
> after the update of a field with the same name: bfqd->busy_queues.
Ok, that make sense, I'll move the update of 'bfqd->busy_queues' into
the new api as well.
Thanks,
Kuai
>
>> if (bfqq->wr_coeff > 1)
>> bfqd->wr_busy_queues--;
>> @@ -1683,6 +1702,7 @@ void bfq_add_bfqq_busy(struct bfq_data *bfqd, struct bfq_queue *bfqq)
>>
>> bfq_mark_bfqq_busy(bfqq);
>> bfqd->busy_queues[bfqq->ioprio_class - 1]++;
>> + bfq_dec_busy_queues(bfqq);
>
> Same pair of comments as above.
>
> Thanks,
> Paolo
>
>>
>> if (!bfqq->dispatched)
>> if (bfqq->wr_coeff == 1)
>> --
>> 2.31.1
>>
>
> .
>
next prev parent reply other threads:[~2022-05-28 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 13:18 [PATCH -next v6 0/3] support concurrent sync io for bfq on a specail occasion Yu Kuai
2022-05-23 13:18 ` [PATCH -next v6 1/3] block, bfq: record how many queues are busy in bfq_group Yu Kuai
2022-05-28 8:18 ` Paolo Valente
2022-05-28 8:37 ` Yu Kuai [this message]
2022-05-23 13:18 ` [PATCH -next v6 2/3] block, bfq: refactor the counting of 'num_groups_with_pending_reqs' Yu Kuai
2022-05-28 8:27 ` Paolo Valente
2022-05-28 8:39 ` Yu Kuai
2022-05-28 8:41 ` Paolo Valente
2022-05-23 13:18 ` [PATCH -next v6 3/3] block, bfq: do not idle if only one group is activated Yu Kuai
2022-05-28 8:30 ` Paolo Valente
2022-05-28 8:18 ` [PATCH -next v6 0/3] support concurrent sync io for bfq on a specail occasion Paolo Valente
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=7628f927-7131-5e7f-33d9-6029dada57fe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).