mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
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:
parent
e9515c3c9f
commit
9c2c48020e
5 changed files with 7 additions and 7 deletions
|
@ -596,6 +596,8 @@ struct rq {
|
|||
#ifdef CONFIG_SCHEDSTATS
|
||||
/* latency stats */
|
||||
struct sched_info rq_sched_info;
|
||||
unsigned long long rq_cpu_time;
|
||||
/* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
|
||||
|
||||
/* sys_sched_yield() stats */
|
||||
unsigned int yld_exp_empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue