diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 343e1794233e..75a005ed4eda 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -948,6 +948,17 @@ static void activate_task(struct task_struct *p, struct rq *rq, int local) | |||
948 | } | 948 | } |
949 | #endif | 949 | #endif |
950 | 950 | ||
951 | /* | ||
952 | * Sleep time is in units of nanosecs, so shift by 20 to get a | ||
953 | * milliseconds-range estimation of the amount of time that the task | ||
954 | * spent sleeping: | ||
955 | */ | ||
956 | if (unlikely(prof_on == SLEEP_PROFILING)) { | ||
957 | if (p->state == TASK_UNINTERRUPTIBLE) | ||
958 | profile_hits(SLEEP_PROFILING, (void *)get_wchan(p), | ||
959 | (now - p->timestamp) >> 20); | ||
960 | } | ||
961 | |||
951 | if (!rt_task(p)) | 962 | if (!rt_task(p)) |
952 | p->prio = recalc_task_prio(p, now); | 963 | p->prio = recalc_task_prio(p, now); |
953 | 964 | ||