Re: [RFC patch 0/4] TSC calibration improvements

From: Ingo Molnar
Date: Sat Sep 06 2008 - 18:40:50 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> "expect" is an unsigned char. There are absolutely _zero_ issues with
> overflow, underflow, random phases of the moon, madness levels or
> anything else. But yes, it does look like Ingo screwed up when adding
> that final check, since expect was already decremented at the end of
> the loop.
>
> Ingo? Did you actually test it?

hm, yes, that's my brown paper bag fault, sorry.

I did that addition in tip/x86/tsc and posted it to you and i did test
it immediately - and i noticed that i never saw the fast-calibration
message i expected to see. I even pasted the boot log over irc yesterday
and i still have it:

*> [ 0.000] TSC: PIT calibration deviates from PMTIMER: 738839 846296.
*> [ 0.000] TSC: Using PIT calibration value
*> [ 0.000] Detected 738.839 MHz processor.
*> does not seem to trigger anywhere

i wanted to debug that problem straight after i worked down my 800+
mails post-vacation mbox :-/ Which state i reached about 2 hours ago so
i'm now free - the fix is below.

i _think_ that the quality of calibration should now be pretty OK with
latest -git. The clever fast calibration stuff could be .28 material.

And/or we could change the 5x 50msec calibration to 3x 30msec right now,
the precision is still plenty and the 90 msec is then replaced with your
fast-calibrate method anyway on proper boxes. Hm?

Ingo

------------------->