Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade

From: john stultz
Date: Wed Jan 21 2009 - 16:34:22 EST


On Wed, 2009-01-21 at 22:07 +0100, Miklos Vajna wrote:
> On Wed, Jan 21, 2009 at 12:00:57PM -0800, john stultz <johnstul@xxxxxxxxxx> wrote:
> > Could you send the output from:
> > cat /sys/devices/system/clocksource/clocksource0/current_clocksource
> > cat /sys/devices/system/clocksource/clocksource0/available_clocksource
> >
> > For both kernels on the affected hardware ?
>
> Output when no related kernel parameters are used:
>
> 2.6.28.1:
>
> $ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
> tsc
> $ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
> tsc pit jiffies
>
> 2.6.27.10:
>
> $ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
> acpi_pm
> $ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
> acpi_pm jiffies tsc
>
> So it seems the problem is that acpi_pm is no longer available.

Yep. Its there, but I see in the 2.6.28 dmesg:
PM-Timer running at invalid rate: 87% of normal - aborting.

Which means its being disqualified.

Looking at the dmesg diff I see:
-TSC: PIT calibration confirmed by PMTIMER.
-TSC: using PMTIMER calibration value
-Detected 1499.820 MHz processor.
+TSC: PIT calibration deviates from PMTIMER: 1309343 1499790.
+TSC: Using PIT calibration value
+Detected 1309.343 MHz processor.

So it seems the PIT is having some sort of issue, which causes the TSC
to be miscalibrated (apparently causing the fast timekeeping in 2.6.28
you're seeing) and in addition it also is disqualifying the acpi_pm
clocksource.

Alas, the circular "what do we trust" issue bites us again.

The TSC calibrate code was reworked recently, but that should have been
in 2.6.27 (if I'm reading the git commit dates properly), so right off I
don't know what to blame.

Ingo/Thomas: Any ideas here?

Miklos: Can you try bisecting this down some?

thanks
-john


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