[patch] BFS 421: use NS_TO_MS

From: Hillf Danton
Date: Thu Jun 14 2012 - 08:23:08 EST


Lets easy reader once more.


--- a/kernel/sched/bfs.c Thu Jun 14 20:01:50 2012
+++ b/kernel/sched/bfs.c Thu Jun 14 20:03:42 2012
@@ -992,15 +992,11 @@ static void activate_task(struct task_st
{
update_clocks(rq);

- /*
- * 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:
- */
+ /* Sleep time is tracked in units of nanosecs, but reported in ms */
if (unlikely(prof_on == SLEEP_PROFILING)) {
if (p->state == TASK_UNINTERRUPTIBLE)
profile_hits(SLEEP_PROFILING, (void *)get_wchan(p),
- (rq->clock - p->last_ran) >> 20);
+ NS_TO_MS(rq->clock - p->last_ran));
}

p->prio = effective_prio(p);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/