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>
Showing
- fs/proc/base.c 1 addition, 1 deletionfs/proc/base.c
- include/linux/sched.h 1 addition, 2 deletionsinclude/linux/sched.h
- kernel/delayacct.c 1 addition, 1 deletionkernel/delayacct.c
- kernel/sched.c 2 additions, 0 deletionskernel/sched.c
- kernel/sched_stats.h 2 additions, 3 deletionskernel/sched_stats.h
Loading
Please register or sign in to comment