|
@@ -59,7 +59,10 @@ static inline struct cpuacct *parent_ca(struct cpuacct *ca)
|
|
|
}
|
|
|
|
|
|
static DEFINE_PER_CPU(u64, root_cpuacct_cpuusage);
|
|
|
-static struct cpuacct root_cpuacct;
|
|
|
+static struct cpuacct root_cpuacct = {
|
|
|
+ .cpustat = &kernel_cpustat,
|
|
|
+ .cpuusage = &root_cpuacct_cpuusage,
|
|
|
+};
|
|
|
|
|
|
/* create a new cpu accounting group */
|
|
|
static struct cgroup_subsys_state *cpuacct_css_alloc(struct cgroup *cgrp)
|
|
@@ -288,12 +291,6 @@ void cpuacct_account_field(struct task_struct *p, int index, u64 val)
|
|
|
rcu_read_unlock();
|
|
|
}
|
|
|
|
|
|
-void __init cpuacct_init(void)
|
|
|
-{
|
|
|
- root_cpuacct.cpustat = &kernel_cpustat;
|
|
|
- root_cpuacct.cpuusage = &root_cpuacct_cpuusage;
|
|
|
-}
|
|
|
-
|
|
|
struct cgroup_subsys cpuacct_subsys = {
|
|
|
.name = "cpuacct",
|
|
|
.css_alloc = cpuacct_css_alloc,
|