Files
kernel_xiaomi_sm8250/include/linux
Roman Gushchin 4e4d5cea79 cgroup: protect cgroup->nr_(dying_)descendants by css_set_lock
[ Upstream commit 4dcabece4c3a9f9522127be12cc12cc120399b2f ]

The number of descendant cgroups and the number of dying
descendant cgroups are currently 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.

So, it's safe to read these counters with either cgroup_mutex or
css_set_lock locked, and for changing both locks should be acquired.

Signed-off-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: kernel-team@fb.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:46:19 -07:00
..
2019-04-17 08:38:42 +02:00
2019-04-20 09:16:05 +02:00
2018-08-22 10:52:48 -07:00
2019-03-23 20:10:09 +01:00
2018-07-24 19:11:26 +02:00
2018-07-27 09:57:23 +10:00
2019-05-31 06:46:18 -07:00
2018-09-04 21:31:43 +02:00
2018-08-08 11:06:20 +02:00
2019-05-22 07:37:44 +02:00
2019-05-16 19:41:22 +02:00
2019-05-04 09:20:11 +02:00
2018-08-22 10:52:45 -07:00
2018-07-25 13:41:22 -07:00
2018-07-21 10:43:12 -05:00
2018-08-22 10:52:46 -07:00
2018-08-02 17:33:06 -04:00
2018-08-02 17:16:05 +02:00
2018-08-16 12:14:42 -07:00
2019-04-17 08:38:45 +02:00
2018-11-13 11:08:51 -08:00