|
@@ -115,10 +115,6 @@ static int irqtime_account_si_update(void)
|
|
|
static inline void task_group_account_field(struct task_struct *p, int index,
|
|
|
u64 tmp)
|
|
|
{
|
|
|
-#ifdef CONFIG_CGROUP_CPUACCT
|
|
|
- struct kernel_cpustat *kcpustat;
|
|
|
- struct cpuacct *ca;
|
|
|
-#endif
|
|
|
/*
|
|
|
* Since all updates are sure to touch the root cgroup, we
|
|
|
* get ourselves ahead and touch it first. If the root cgroup
|
|
@@ -127,19 +123,7 @@ static inline void task_group_account_field(struct task_struct *p, int index,
|
|
|
*/
|
|
|
__get_cpu_var(kernel_cpustat).cpustat[index] += tmp;
|
|
|
|
|
|
-#ifdef CONFIG_CGROUP_CPUACCT
|
|
|
- if (unlikely(!cpuacct_subsys.active))
|
|
|
- return;
|
|
|
-
|
|
|
- rcu_read_lock();
|
|
|
- ca = task_ca(p);
|
|
|
- while (ca && (ca != &root_cpuacct)) {
|
|
|
- kcpustat = this_cpu_ptr(ca->cpustat);
|
|
|
- kcpustat->cpustat[index] += tmp;
|
|
|
- ca = parent_ca(ca);
|
|
|
- }
|
|
|
- rcu_read_unlock();
|
|
|
-#endif
|
|
|
+ cpuacct_account_field(p, index, tmp);
|
|
|
}
|
|
|
|
|
|
/*
|