Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347884
b: refs/heads/master
c: 154b454
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Dec 21, 2012
1 parent eb40905 commit a34a9d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 495e9d84607cda966ba6d223d5eb9df0070cd21a
refs/heads/master: 154b454edaf6d94a69016db6c342c57fa935bbe9
14 changes: 13 additions & 1 deletion trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -6090,7 +6090,6 @@ mem_cgroup_css_alloc(struct cgroup *cont)
&per_cpu(memcg_stock, cpu);
INIT_WORK(&stock->work, drain_local_stock);
}
hotcpu_notifier(memcg_cpu_hotplug_callback, 0);
} else {
parent = mem_cgroup_from_cont(cont->parent);
memcg->use_hierarchy = parent->use_hierarchy;
Expand Down Expand Up @@ -6756,6 +6755,19 @@ struct cgroup_subsys mem_cgroup_subsys = {
.use_id = 1,
};

/*
* 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().
*/
static int __init mem_cgroup_init(void)
{
hotcpu_notifier(memcg_cpu_hotplug_callback, 0);
return 0;
}
subsys_initcall(mem_cgroup_init);

#ifdef CONFIG_MEMCG_SWAP
static int __init enable_swap_account(char *s)
{
Expand Down

0 comments on commit a34a9d5

Please sign in to comment.