File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6090,7 +6090,6 @@ mem_cgroup_css_alloc(struct cgroup *cont)
6090
6090
& per_cpu (memcg_stock , cpu );
6091
6091
INIT_WORK (& stock -> work , drain_local_stock );
6092
6092
}
6093
- hotcpu_notifier (memcg_cpu_hotplug_callback , 0 );
6094
6093
} else {
6095
6094
parent = mem_cgroup_from_cont (cont -> parent );
6096
6095
memcg -> use_hierarchy = parent -> use_hierarchy ;
@@ -6756,6 +6755,19 @@ struct cgroup_subsys mem_cgroup_subsys = {
6756
6755
.use_id = 1 ,
6757
6756
};
6758
6757
6758
+ /*
6759
+ * The rest of init is performed during ->css_alloc() for root css which
6760
+ * happens before initcalls. hotcpu_notifier() can't be done together as
6761
+ * it would introduce circular locking by adding cgroup_lock -> cpu hotplug
6762
+ * dependency. Do it from a subsys_initcall().
6763
+ */
6764
+ static int __init mem_cgroup_init (void )
6765
+ {
6766
+ hotcpu_notifier (memcg_cpu_hotplug_callback , 0 );
6767
+ return 0 ;
6768
+ }
6769
+ subsys_initcall (mem_cgroup_init );
6770
+
6759
6771
#ifdef CONFIG_MEMCG_SWAP
6760
6772
static int __init enable_swap_account (char * s )
6761
6773
{
You can’t perform that action at this time.
0 commit comments