[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181120161818.GT2509588@devbig004.ftw2.facebook.com>
Date: Tue, 20 Nov 2018 08:18:18 -0800
From: Tejun Heo <tj@...nel.org>
To: Roman Gushchin <guroan@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...com,
Roman Gushchin <guro@...com>
Subject: Re: [PATCH v3 3/7] cgroup: protect cgroup->nr_(dying_)descendants by
css_set_lock
On Fri, Nov 16, 2018 at 04:38:26PM -0800, Roman Gushchin wrote:
> Now the number of descendant cgroups and the number of dying
> descendant cgroups are synchronized using the cgroup_mutex.
>
> The number of descendant cgroups will be required by the cgroup v2
> freezer, which will use it to determine if a cgroup is frozen
> (depending on total number of descendants and number of frozen
> descendants). It's not always acceptable to grab the cgroup_mutex,
> especially from quite hot paths (e.g. exit()).
>
> To avoid this, let's additionally synchronize these counters
> using the css_set_lock.
Can you change it so that writes are cgroup_mutex and css_set_lock
protected and reads can be done under either cgroup_mutex or
css_set_lock?
Thanks.
--
tejun
Powered by blists - more mailing lists