Messages in this thread Patch in this message | | | Date | Thu, 14 Jun 2012 20:23:10 +0800 | Subject | [patch] BFS 421: use NS_TO_MS | From | Hillf Danton <> |
| |
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); --
| |