Commit 30084fbd1caa4b2e1a336fcdef60b68129d1d8f8
1 parent
3146b39c18
Exists in
master
and in
7 other branches
sched: fix profile=sleep
fix sleep profiling - we lost this chunk in the CFS merge. Found-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff
kernel/sched_fair.c
... | ... | @@ -639,6 +639,16 @@ |
639 | 639 | |
640 | 640 | se->block_start = 0; |
641 | 641 | se->sum_sleep_runtime += delta; |
642 | + | |
643 | + /* | |
644 | + * Blocking time is in units of nanosecs, so shift by 20 to | |
645 | + * get a milliseconds-range estimation of the amount of | |
646 | + * time that the task spent sleeping: | |
647 | + */ | |
648 | + if (unlikely(prof_on == SLEEP_PROFILING)) { | |
649 | + profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk), | |
650 | + delta >> 20); | |
651 | + } | |
642 | 652 | } |
643 | 653 | #endif |
644 | 654 | } |