summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKen Chen <kenchen@google.com>2008-12-17 10:41:22 +0300
committerIngo Molnar <mingo@elte.hu>2008-12-18 15:54:01 +0300
commit9c2c48020ec0dd6ecd27e5a1298f73b40d85a595 (patch)
tree1a44f56e18012120aff0969094eebd572deb2ea3 /fs
parente9515c3c9feecd74174c2998add0db51e02abb8d (diff)
downloadlinux-9c2c48020ec0dd6ecd27e5a1298f73b40d85a595.tar.xz
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 'fs')
-rw-r--r--fs/proc/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index d4677603c889..4d745bac768c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -347,7 +347,7 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer)
static int proc_pid_schedstat(struct task_struct *task, char *buffer)
{
return sprintf(buffer, "%llu %llu %lu\n",
- task->sched_info.cpu_time,
+ task->se.sum_exec_runtime,
task->sched_info.run_delay,
task->sched_info.pcount);
}