summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2013-02-07 12:27:10 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:25:45 +1100
commite1d14496a0ce3fcd7da7d4bfcc387d6da1daacb0 (patch)
tree196146353b82207697d5412281c88a4216aa2ad9 /mm
parent95df910f16889a0d3c4e3652eb82e0905ac172e5 (diff)
memcg: cleanup mem_cgroup_init comment
We should encourage all memcg controller initialization independent on a specific mem_cgroup to be done here rather than exploit css_alloc callback and assume that nothing happens before root cgroup is created. Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Tejun Heo <htejun@gmail.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5a70a1933961..d2501259625d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6831,10 +6831,12 @@ static void __init enable_swap_cgroup(void)
#endif
/*
- * The rest of init is performed during ->css_alloc() for root css which
- * happens before initcalls. hotcpu_notifier() can't be done together as
- * it would introduce circular locking by adding cgroup_lock -> cpu hotplug
- * dependency. Do it from a subsys_initcall().
+ * subsys_initcall() for memory controller.
+ *
+ * Some parts like hotcpu_notifier() have to be initialized from this context
+ * because of lock dependencies (cgroup_lock -> cpu hotplug) but basically
+ * everything that doesn't depend on a specific mem_cgroup structure should
+ * be initialized from here.
*/
static int __init mem_cgroup_init(void)
{