Re: [2.6.16-mm1 patch] throttling tree patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2006-03-25 at 11:25 +1100, Peter Williams wrote:
> Con Kolivas wrote:

> >>  	if (!rt_task(p))
> >> -		p->prio = recalc_task_prio(p, now);
> >> +		p->prio = recalc_task_prio(p, comp);
> > 
> > Seems wasteful of a very expensive (on 32bit) unsigned long long on 
> > uniprocessor builds.
> 
> Unsigned long long is necessary in order to avoid overflow when dealing 
> with nano seconds but (if you reorganized the expressions and made the 
> desired precedence explicit) you could probably use something smaller 
> for the difference between the two timestamp_lats_tick values.  More 
> importantly, I think that the original code which used the computed 
> "now" was correct as otherwise the task's timestamp will not have the 
> correct time for its CPU.

I can live with it either way.  On my SMT box, the rounding is much
worse than the actual drift, that's microseconds, but the rounding turns
it into milliseconds.

> Of course, this all hinges on the differences between the run queues' 
> timestamp_last_tick fields being a true measure of the time drift 
> between them.  I've never been wholly convinced of that but as long as 
> any error is much smaller than the drift it's probably worth doing.

On a real SMP, this adjusting of timestamps probably helps (dunno, no
have), on my box it's doomed to do more harm than good.  To me, the only
thing that really matters is ignoring the bogus transition.

	-Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux