Re: [PATCH v3 3/7] cgroup: protect cgroup->nr_(dying_)descendants by css_set_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux