From: xiujianfeng <xiujianfeng@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <josef@toxicpanda.com>, <axboe@kernel.dk>,
<lizefan.x@bytedance.com>, <hannes@cmpxchg.org>,
<cgroups@vger.kernel.org>, <linux-block@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] blk-cgroup: move congestion_count to struct blkcg
Date: Mon, 15 Jul 2024 20:35:30 +0800 [thread overview]
Message-ID: <57994fe4-edd0-bc28-c134-83f72579c6c8@huawei.com> (raw)
In-Reply-To: <ZpK8Nup6_sOvSZ7E@slm.duckdns.org>
On 2024/7/14 1:41, Tejun Heo wrote:
> Hello,
>
> Sorry about the previous reply. I completely misread the patch.
>
> On Fri, Jul 12, 2024 at 08:51:41AM +0000, Xiu Jianfeng wrote:
> ...
>> only compiling tested
>
> It'd be better if there's a bit more verification.
>
>> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
>> index 37e6cc91d576..01d3408c2fc6 100644
>> --- a/block/blk-cgroup.c
>> +++ b/block/blk-cgroup.c
>> @@ -2183,11 +2183,13 @@ void blk_cgroup_bio_start(struct bio *bio)
>> bool blk_cgroup_congested(void)
>> {
>> struct cgroup_subsys_state *css;
>> + struct blkcg *blkcg;
>
> It'd be better to define this within the loop.
>
>> bool ret = false;
>>
>> rcu_read_lock();
>> for (css = blkcg_css(); css; css = css->parent) {
>
> Also, if we're now dealing with blkcg's, there's no reason to go blkcg ->
> css -> blkcg again. It'd be better to get the initial blkcg and then walk up
> using blkcg_parent().
Thanks, will do in v2.
>
>> @@ -95,6 +95,8 @@ struct blkcg {
>> struct cgroup_subsys_state css;
>> spinlock_t lock;
>> refcount_t online_pin;
>> + /* If there is block congestion on this cgroup. */
>> + atomic_t congestion_count;
>
> Can you please match the indentation?
Sure, I copied it from the original place, will do in v2
>
> Thanks.
>
prev parent reply other threads:[~2024-07-15 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 8:51 [PATCH -next] blk-cgroup: move congestion_count to struct blkcg Xiu Jianfeng
2024-07-12 17:19 ` Tejun Heo
2024-07-13 10:56 ` Yu Kuai
2024-07-13 17:35 ` Tejun Heo
2024-07-13 17:41 ` Tejun Heo
2024-07-15 12:35 ` xiujianfeng [this message]
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=57994fe4-edd0-bc28-c134-83f72579c6c8@huawei.com \
--to=xiujianfeng@huawei.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=tj@kernel.org \
/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