aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMichal Hocko2013-02-22 18:35:41 -0600
committerLinus Torvalds2013-02-23 19:50:21 -0600
commit1081312f95be1a0fc093556d789e482d3ab0f5b0 (patch)
tree5d6ac1499b9f1724cb3f77a69c6bb23791158f01 /mm
parente477749624fcf0dc95bfa494b7fa6ba2000fe670 (diff)
downloadam43-linux-kernel-1081312f95be1a0fc093556d789e482d3ab0f5b0.tar.gz
am43-linux-kernel-1081312f95be1a0fc093556d789e482d3ab0f5b0.tar.xz
am43-linux-kernel-1081312f95be1a0fc093556d789e482d3ab0f5b0.zip
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> Signed-off-by: Linus Torvalds <torvalds@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 604eddc5866..d4f0a831c9e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6830,10 +6830,12 @@ static void __init enable_swap_cgroup(void)
6830#endif 6830#endif
6831 6831
6832/* 6832/*
6833 * The rest of init is performed during ->css_alloc() for root css which 6833 * subsys_initcall() for memory controller.
6834 * happens before initcalls. hotcpu_notifier() can't be done together as 6834 *
6835 * it would introduce circular locking by adding cgroup_lock -> cpu hotplug 6835 * Some parts like hotcpu_notifier() have to be initialized from this context
6836 * dependency. Do it from a subsys_initcall(). 6836 * because of lock dependencies (cgroup_lock -> cpu hotplug) but basically
6837 * everything that doesn't depend on a specific mem_cgroup structure should
6838 * be initialized from here.
6837 */ 6839 */
6838static int __init mem_cgroup_init(void) 6840static int __init mem_cgroup_init(void)
6839{ 6841{