Re: Regression in 2.6.27 caused by commit bfc0f59

From: Linus Torvalds
Date: Mon Sep 01 2008 - 15:11:26 EST




On Mon, 1 Sep 2008, Thomas Gleixner wrote:
>
> Hmm. Haven't seen that before, but if confirms what I guessed from
> your previous dmesg information. I wonder why you did not observe
> strange behaviour with older kernel versions.

x86-32 never used the PM_TIMER for frequency estimation, it only ever used
the PIT. See the old "native_calculate_cpu_khz()" in tsc_32.c that you
deleted in favor of the (imho inferior) x86-64 version.

How about:

- taking the old 32-bit code, and using it to initially _just_ estimate
the TSC speed. That code was stable and pretty much guaranteed to work
reasonably well on all machines. It retries the timings three times,
and picks the best one.

- Then, _after_ you already have a pretty good estimation for TSC, you
can use _that_ to then get the HPET and/or PM_TIMER version (and not
use the PIT at all for those calibrations)

- and if the PM_TIMER one is too far off, just throw it away. We know the
PIT is a lot more trustworthy than the PM_TIMER.

Hmm?

Linus
--
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/