diff options
author | Ken Chen <kenchen@google.com> | 2008-12-17 02:41:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-18 07:54:01 -0500 |
commit | 9c2c48020ec0dd6ecd27e5a1298f73b40d85a595 (patch) | |
tree | 1a44f56e18012120aff0969094eebd572deb2ea3 /include/linux/sched.h | |
parent | e9515c3c9feecd74174c2998add0db51e02abb8d (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 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8cccd6dc5d66..2d1e840ddd35 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -670,8 +670,7 @@ struct reclaim_state; | |||
670 | struct sched_info { | 670 | struct sched_info { |
671 | /* cumulative counters */ | 671 | /* cumulative counters */ |
672 | unsigned long pcount; /* # of times run on this cpu */ | 672 | unsigned long pcount; /* # of times run on this cpu */ |
673 | unsigned long long cpu_time, /* time spent on the cpu */ | 673 | unsigned long long run_delay; /* time spent waiting on a runqueue */ |
674 | run_delay; /* time spent waiting on a runqueue */ | ||
675 | 674 | ||
676 | /* timestamps */ | 675 | /* timestamps */ |
677 | unsigned long long last_arrival,/* when we last ran on a cpu */ | 676 | unsigned long long last_arrival,/* when we last ran on a cpu */ |