Re: [2.6.16-mm1 patch] throttling tree patches



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Slow convergence of NTP with GPS/PPS
    ... you can get a pretty good estimate of the drift, ... It isn't NTP which is the limit, but the GPS receiver acquiring lock from ... It's easy to determine and set the correct time. ... easy to determine and set the correct frequency and thus KEEP the ...
    (comp.protocols.time.ntp)
  • Re: [SLE] NTP & SUSE 9
    ... > I have the correct time like others machines (using ntpd). ... You are not reading what they tell you. ... If, when using the ntp daemon the time is kept accurate, then the drift ...
    (SuSE)