lkml.org 
[lkml]   [2012]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[patch] BFS 421: use NS_TO_MS
From
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);
--

\
 
 \ /
  Last update: 2012-06-14 15:01    [W:0.045 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site