aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-29 02:44:28 -0400
committerIngo Molnar <mingo@kernel.org>2013-04-10 07:54:22 -0400
commita2b0ae25fc8bfeeb4022b8e847ab811b3c8368d1 (patch)
treefde01115c40d05a8fe1fe57a4fa4c8477e8a0528 /kernel/sched
parent621e2de02403a6f776852c564b79c38bf3cc9032 (diff)
sched/cpuacct: No need to check subsys active state
Now we're guaranteed when cpuacct_charge() and cpuacct_account_field() are called, cpuacct has already been properly initialized, so we no longer need those checks. Signed-off-by: Li Zefan <lizefan@huawei.com> Cc: Tejun Heo <tj@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/5155384C.7000508@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/cpuacct.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c
index 75e46d291f9c..ef57ab658722 100644
--- a/kernel/sched/cpuacct.c
+++ b/kernel/sched/cpuacct.c
@@ -247,9 +247,6 @@ void cpuacct_charge(struct task_struct *tsk, u64 cputime)
247 struct cpuacct *ca; 247 struct cpuacct *ca;
248 int cpu; 248 int cpu;
249 249
250 if (unlikely(!cpuacct_subsys.active))
251 return;
252
253 cpu = task_cpu(tsk); 250 cpu = task_cpu(tsk);
254 251
255 rcu_read_lock(); 252 rcu_read_lock();
@@ -278,9 +275,6 @@ void cpuacct_account_field(struct task_struct *p, int index, u64 val)
278 struct kernel_cpustat *kcpustat; 275 struct kernel_cpustat *kcpustat;
279 struct cpuacct *ca; 276 struct cpuacct *ca;
280 277
281 if (unlikely(!cpuacct_subsys.active))
282 return;
283
284 rcu_read_lock(); 278 rcu_read_lock();
285 ca = task_ca(p); 279 ca = task_ca(p);
286 while (ca != &root_cpuacct) { 280 while (ca != &root_cpuacct) {