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>
This commit is contained in:
@@ -670,8 +670,7 @@ struct reclaim_state;
|
||||
struct sched_info {
|
||||
/* cumulative counters */
|
||||
unsigned long pcount; /* # of times run on this cpu */
|
||||
unsigned long long cpu_time, /* time spent on the cpu */
|
||||
run_delay; /* time spent waiting on a runqueue */
|
||||
unsigned long long run_delay; /* time spent waiting on a runqueue */
|
||||
|
||||
/* timestamps */
|
||||
unsigned long long last_arrival,/* when we last ran on a cpu */
|
||||
|
Reference in New Issue
Block a user