diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 20:40:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 20:40:19 -0400 |
commit | 88d6ae8dc33af12fe1c7941b1fae2767374046fd (patch) | |
tree | 8f17415c0722b0a4d7511ac170cfb4e3802e1ad2 /kernel/sched | |
parent | f5c101892fbd3d2f6d2729bc7eb7b3f6c31dbddd (diff) | |
parent | 0d4dde1ac9a5af74ac76c6ab90557d1ae7b8f5d8 (diff) |
Merge branch 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup updates from Tejun Heo:
"cgroup file type addition / removal is updated so that file types are
added and removed instead of individual files so that dynamic file
type addition / removal can be implemented by cgroup and used by
controllers. blkio controller changes which will come through block
tree are dependent on this. Other changes include res_counter cleanup
and disallowing kthread / PF_THREAD_BOUND threads to be attached to
non-root cgroups.
There's a reported bug with the file type addition / removal handling
which can lead to oops on cgroup umount. The issue is being looked
into. It shouldn't cause problems for most setups and isn't a
security concern."
Fix up trivial conflict in Documentation/feature-removal-schedule.txt
* 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (21 commits)
res_counter: Account max_usage when calling res_counter_charge_nofail()
res_counter: Merge res_counter_charge and res_counter_charge_nofail
cgroups: disallow attaching kthreadd or PF_THREAD_BOUND threads
cgroup: remove cgroup_subsys->populate()
cgroup: get rid of populate for memcg
cgroup: pass struct mem_cgroup instead of struct cgroup to socket memcg
cgroup: make css->refcnt clearing on cgroup removal optional
cgroup: use negative bias on css->refcnt to block css_tryget()
cgroup: implement cgroup_rm_cftypes()
cgroup: introduce struct cfent
cgroup: relocate __d_cgrp() and __d_cft()
cgroup: remove cgroup_add_file[s]()
cgroup: convert memcg controller to the new cftype interface
memcg: always create memsw files if CONFIG_CGROUP_MEM_RES_CTLR_SWAP
cgroup: convert all non-memcg controllers to the new cftype interface
cgroup: relocate cftype and cgroup_subsys definitions in controllers
cgroup: merge cft_release_agent cftype array into the base files array
cgroup: implement cgroup_add_cftypes() and friends
cgroup: build list of all cgroups under a given cgroupfs_root
cgroup: move cgroup_clear_directory() call out of cgroup_populate_dir()
...
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ea8a4769fea5..03667c3fdb33 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -7985,13 +7985,9 @@ static struct cftype cpu_files[] = { | |||
7985 | .write_u64 = cpu_rt_period_write_uint, | 7985 | .write_u64 = cpu_rt_period_write_uint, |
7986 | }, | 7986 | }, |
7987 | #endif | 7987 | #endif |
7988 | { } /* terminate */ | ||
7988 | }; | 7989 | }; |
7989 | 7990 | ||
7990 | static int cpu_cgroup_populate(struct cgroup_subsys *ss, struct cgroup *cont) | ||
7991 | { | ||
7992 | return cgroup_add_files(cont, ss, cpu_files, ARRAY_SIZE(cpu_files)); | ||
7993 | } | ||
7994 | |||
7995 | struct cgroup_subsys cpu_cgroup_subsys = { | 7991 | struct cgroup_subsys cpu_cgroup_subsys = { |
7996 | .name = "cpu", | 7992 | .name = "cpu", |
7997 | .create = cpu_cgroup_create, | 7993 | .create = cpu_cgroup_create, |
@@ -7999,8 +7995,8 @@ struct cgroup_subsys cpu_cgroup_subsys = { | |||
7999 | .can_attach = cpu_cgroup_can_attach, | 7995 | .can_attach = cpu_cgroup_can_attach, |
8000 | .attach = cpu_cgroup_attach, | 7996 | .attach = cpu_cgroup_attach, |
8001 | .exit = cpu_cgroup_exit, | 7997 | .exit = cpu_cgroup_exit, |
8002 | .populate = cpu_cgroup_populate, | ||
8003 | .subsys_id = cpu_cgroup_subsys_id, | 7998 | .subsys_id = cpu_cgroup_subsys_id, |
7999 | .base_cftypes = cpu_files, | ||
8004 | .early_init = 1, | 8000 | .early_init = 1, |
8005 | }; | 8001 | }; |
8006 | 8002 | ||
@@ -8185,13 +8181,9 @@ static struct cftype files[] = { | |||
8185 | .name = "stat", | 8181 | .name = "stat", |
8186 | .read_map = cpuacct_stats_show, | 8182 | .read_map = cpuacct_stats_show, |
8187 | }, | 8183 | }, |
8184 | { } /* terminate */ | ||
8188 | }; | 8185 | }; |
8189 | 8186 | ||
8190 | static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp) | ||
8191 | { | ||
8192 | return cgroup_add_files(cgrp, ss, files, ARRAY_SIZE(files)); | ||
8193 | } | ||
8194 | |||
8195 | /* | 8187 | /* |
8196 | * charge this task's execution time to its accounting group. | 8188 | * charge this task's execution time to its accounting group. |
8197 | * | 8189 | * |
@@ -8223,7 +8215,7 @@ struct cgroup_subsys cpuacct_subsys = { | |||
8223 | .name = "cpuacct", | 8215 | .name = "cpuacct", |
8224 | .create = cpuacct_create, | 8216 | .create = cpuacct_create, |
8225 | .destroy = cpuacct_destroy, | 8217 | .destroy = cpuacct_destroy, |
8226 | .populate = cpuacct_populate, | ||
8227 | .subsys_id = cpuacct_subsys_id, | 8218 | .subsys_id = cpuacct_subsys_id, |
8219 | .base_cftypes = files, | ||
8228 | }; | 8220 | }; |
8229 | #endif /* CONFIG_CGROUP_CPUACCT */ | 8221 | #endif /* CONFIG_CGROUP_CPUACCT */ |