aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorKen Chen <kenchen@google.com>2008-12-17 02:41:22 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-18 07:54:01 -0500
commit9c2c48020ec0dd6ecd27e5a1298f73b40d85a595 (patch)
tree1a44f56e18012120aff0969094eebd572deb2ea3 /kernel/sched.c
parente9515c3c9feecd74174c2998add0db51e02abb8d (diff)
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/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f53e2b8ef521..fd835fc320b8 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -596,6 +596,8 @@ struct rq {
596#ifdef CONFIG_SCHEDSTATS 596#ifdef CONFIG_SCHEDSTATS
597 /* latency stats */ 597 /* latency stats */
598 struct sched_info rq_sched_info; 598 struct sched_info rq_sched_info;
599 unsigned long long rq_cpu_time;
600 /* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
599 601
600 /* sys_sched_yield() stats */ 602 /* sys_sched_yield() stats */
601 unsigned int yld_exp_empty; 603 unsigned int yld_exp_empty;