summaryrefslogtreecommitdiffstats
path: root/kernel/delayacct.c
diff options
context:
space:
mode:
authorKen Chen <kenchen@google.com>2008-12-16 23:41:22 -0800
committerIngo Molnar <mingo@elte.hu>2008-12-18 13:54:01 +0100
commit9c2c48020ec0dd6ecd27e5a1298f73b40d85a595 (patch)
tree1a44f56e18012120aff0969094eebd572deb2ea3 /kernel/delayacct.c
parente9515c3c9feecd74174c2998add0db51e02abb8d (diff)
downloadlinux-9c2c48020ec0dd6ecd27e5a1298f73b40d85a595.tar.gz
linux-9c2c48020ec0dd6ecd27e5a1298f73b40d85a595.tar.bz2
linux-9c2c48020ec0dd6ecd27e5a1298f73b40d85a595.zip
schedstat: consolidate per-task cpu runtime stats
Impact: simplify code When we turn on CONFIG_SCHEDSTATS, per-task cpu runtime is accumulated twice. Once in task->se.sum_exec_runtime and once in sched_info.cpu_time. These two stats are exactly the same. Given that task->se.sum_exec_runtime is always accumulated by the core scheduler, sched_info can reuse that data instead of duplicate the accounting. Signed-off-by: Ken Chen <kenchen@google.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/delayacct.c')
-rw-r--r--kernel/delayacct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/delayacct.c b/kernel/delayacct.c
index b3179dad71be..abb6e17505e2 100644
--- a/kernel/delayacct.c
+++ b/kernel/delayacct.c
@@ -127,7 +127,7 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)
*/
t1 = tsk->sched_info.pcount;
t2 = tsk->sched_info.run_delay;
- t3 = tsk->sched_info.cpu_time;
+ t3 = tsk->se.sum_exec_runtime;
d->cpu_count += t1;