summaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-29 14:36:55 +0800
committerIngo Molnar <mingo@kernel.org>2013-04-10 13:54:16 +0200
commitdbe4b41f9800223949ce72e4289814697e0ea91a (patch)
tree11f24c688852b29656724f0e7266f5b04d4291c6 /kernel/sched/core.c
parent60fed7891d4115be0ed7ff9ce6851eda80533c64 (diff)
sched/cpuacct: Add cpuacct_init()
So we don't open-coded initialization of cpuacct in core.c. Signed-off-by: Li Zefan <lizefan@huawei.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/51553687.1060906@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c28222f72c8..92930a89529 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6936,12 +6936,8 @@ void __init sched_init(void)
#endif /* CONFIG_CGROUP_SCHED */
-#ifdef CONFIG_CGROUP_CPUACCT
- root_cpuacct.cpustat = &kernel_cpustat;
- root_cpuacct.cpuusage = alloc_percpu(u64);
- /* Too early, not expected to fail */
- BUG_ON(!root_cpuacct.cpuusage);
-#endif
+ cpuacct_init();
+
for_each_possible_cpu(i) {
struct rq *rq;