From: Andrew Morton Cc: Ingo Molnar Signed-off-by: Andrew Morton --- Documentation/kernel-parameters.txt | 1 + kernel/sched.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff -puN Documentation/kernel-parameters.txt~sleep-profiling-fixes Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt~sleep-profiling-fixes +++ a/Documentation/kernel-parameters.txt @@ -1301,6 +1301,7 @@ and is between 256 and 4096 characters. Param: "schedule" - profile schedule points. Param: - step/bucket size as a power of 2 for statistical time based profiling. + Param: "sleep" - profile D-state sleeping (millisecs) processor.max_cstate= [HW,ACPI] Limit processor to maximum C-state diff -puN kernel/sched.c~sleep-profiling-fixes kernel/sched.c --- a/kernel/sched.c~sleep-profiling-fixes +++ a/kernel/sched.c @@ -949,9 +949,9 @@ static void activate_task(struct task_st #endif /* - * Sleep time is in units of nanosecs, so shift by 30 - * to get a milliseconds-range estimation of the amount - * of time that the task spent sleeping: + * Sleep 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)) { if (p->state == TASK_UNINTERRUPTIBLE) _