提交 30084fbd 编写于 作者: I Ingo Molnar

sched: fix profile=sleep

fix sleep profiling - we lost this chunk in the CFS merge.
Found-by: NMel Gorman <mel@csn.ul.ie>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3146b39c
......@@ -639,6 +639,16 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
se->block_start = 0;
se->sum_sleep_runtime += delta;
/*
* Blocking time is in units of nanosecs, so shift by 20 to
* get a milliseconds-range estimation of the amount of
* time that the task spent sleeping:
*/
if (unlikely(prof_on == SLEEP_PROFILING)) {
profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk),
delta >> 20);
}
}
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册