[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <X75TuKMuO2Ru+rVt@mtj.duckdns.org>
Date: Wed, 25 Nov 2020 07:53:12 -0500
From: Tejun Heo <tj@...nel.org>
To: "yukuai (C)" <yukuai3@...wei.com>
Cc: axboe@...nel.dk, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, zhangxiaoxu5@...wei.com, houtao1@...wei.com
Subject: Re: [RFC PATCH] blk-cgroup: prevent rcu_sched detected stalls
warnings in blkg_destroy_all()
Hello,
On Wed, Nov 25, 2020 at 08:49:19PM +0800, yukuai (C) wrote:
> > You can't continue iteration after dropping both locks. You'd have to jump
> > out of loop and start list_for_each_entry_safe() again.
>
> Thanks for your review, it's right. On the other hand
> blkcg_activate_policy() and blkcg_deactivate_policy() might have the
> same issue. My idea is that inserting a bookmark to the list, and
> restard from here.
For destruction, as we're destroying the list anyway, we don't need to
insert bookmark and start over from the beginning. For [de]activate policy,
we might need something fancier or change locking so that we can sleep while
iterating. However, policy [de]activations are a lot less of a problem as
they aren't operations which can happen commonly.
> By the way, I found that blk_throtl_update_limit_valid() is called from
> throtl_pd_offline(). If CONFIG_BLK_DEV_THROTTLING_LOW is off, lower
> limit will always be zero, therefor a lot of time will be wasted to
> iterate descendants to find a nonzero lower limit.
>
> Do you think it's ok to do such modification:
Yeah, sure. Looks fine to me.
Thanks.
--
tejun
Powered by blists - more mailing lists