diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
commit | 0d9cabdccedb79ee5f27b77ff51f29a9e7d23275 (patch) | |
tree | 8bfb64c3672d058eb90aec3c3a9c4f61cef9097c /kernel/sched | |
parent | 701085b219016d38f105b031381b9cee6200253a (diff) | |
parent | 3ce3230a0cff484e5130153f244d4fb8a56b3a8b (diff) |
Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo:
"Out of the 8 commits, one fixes a long-standing locking issue around
tasklist walking and others are cleanups."
* 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: Walk task list under tasklist_lock in cgroup_enable_task_cg_list
cgroup: Remove wrong comment on cgroup_enable_task_cg_list()
cgroup: remove cgroup_subsys argument from callbacks
cgroup: remove extra calls to find_existing_css_set
cgroup: replace tasklist_lock with rcu_read_lock
cgroup: simplify double-check locking in cgroup_attach_proc
cgroup: move struct cgroup_pidlist out from the header file
cgroup: remove cgroup_attach_task_current_cg()
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d2bd4647586c..a35cb8dbd8c4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -7571,8 +7571,7 @@ static inline struct task_group *cgroup_tg(struct cgroup *cgrp) | |||
7571 | struct task_group, css); | 7571 | struct task_group, css); |
7572 | } | 7572 | } |
7573 | 7573 | ||
7574 | static struct cgroup_subsys_state * | 7574 | static struct cgroup_subsys_state *cpu_cgroup_create(struct cgroup *cgrp) |
7575 | cpu_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cgrp) | ||
7576 | { | 7575 | { |
7577 | struct task_group *tg, *parent; | 7576 | struct task_group *tg, *parent; |
7578 | 7577 | ||
@@ -7589,15 +7588,14 @@ cpu_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cgrp) | |||
7589 | return &tg->css; | 7588 | return &tg->css; |
7590 | } | 7589 | } |
7591 | 7590 | ||
7592 | static void | 7591 | static void cpu_cgroup_destroy(struct cgroup *cgrp) |
7593 | cpu_cgroup_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) | ||
7594 | { | 7592 | { |
7595 | struct task_group *tg = cgroup_tg(cgrp); | 7593 | struct task_group *tg = cgroup_tg(cgrp); |
7596 | 7594 | ||
7597 | sched_destroy_group(tg); | 7595 | sched_destroy_group(tg); |
7598 | } | 7596 | } |
7599 | 7597 | ||
7600 | static int cpu_cgroup_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 7598 | static int cpu_cgroup_can_attach(struct cgroup *cgrp, |
7601 | struct cgroup_taskset *tset) | 7599 | struct cgroup_taskset *tset) |
7602 | { | 7600 | { |
7603 | struct task_struct *task; | 7601 | struct task_struct *task; |
@@ -7615,7 +7613,7 @@ static int cpu_cgroup_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | |||
7615 | return 0; | 7613 | return 0; |
7616 | } | 7614 | } |
7617 | 7615 | ||
7618 | static void cpu_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 7616 | static void cpu_cgroup_attach(struct cgroup *cgrp, |
7619 | struct cgroup_taskset *tset) | 7617 | struct cgroup_taskset *tset) |
7620 | { | 7618 | { |
7621 | struct task_struct *task; | 7619 | struct task_struct *task; |
@@ -7625,8 +7623,8 @@ static void cpu_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | |||
7625 | } | 7623 | } |
7626 | 7624 | ||
7627 | static void | 7625 | static void |
7628 | cpu_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, | 7626 | cpu_cgroup_exit(struct cgroup *cgrp, struct cgroup *old_cgrp, |
7629 | struct cgroup *old_cgrp, struct task_struct *task) | 7627 | struct task_struct *task) |
7630 | { | 7628 | { |
7631 | /* | 7629 | /* |
7632 | * cgroup_exit() is called in the copy_process() failure path. | 7630 | * cgroup_exit() is called in the copy_process() failure path. |
@@ -7976,8 +7974,7 @@ struct cgroup_subsys cpu_cgroup_subsys = { | |||
7976 | */ | 7974 | */ |
7977 | 7975 | ||
7978 | /* create a new cpu accounting group */ | 7976 | /* create a new cpu accounting group */ |
7979 | static struct cgroup_subsys_state *cpuacct_create( | 7977 | static struct cgroup_subsys_state *cpuacct_create(struct cgroup *cgrp) |
7980 | struct cgroup_subsys *ss, struct cgroup *cgrp) | ||
7981 | { | 7978 | { |
7982 | struct cpuacct *ca; | 7979 | struct cpuacct *ca; |
7983 | 7980 | ||
@@ -8007,8 +8004,7 @@ out: | |||
8007 | } | 8004 | } |
8008 | 8005 | ||
8009 | /* destroy an existing cpu accounting group */ | 8006 | /* destroy an existing cpu accounting group */ |
8010 | static void | 8007 | static void cpuacct_destroy(struct cgroup *cgrp) |
8011 | cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) | ||
8012 | { | 8008 | { |
8013 | struct cpuacct *ca = cgroup_ca(cgrp); | 8009 | struct cpuacct *ca = cgroup_ca(cgrp); |
8014 | 8010 | ||