Re: [PATCH] tsc_khz= boot option to avoid TSC calibration variance

From: Petri Kaukasoina
Date: Wed May 13 2009 - 05:41:34 EST


On Tue, May 12, 2009 at 04:02:46PM -0700, john stultz wrote:
> A neat idea from Miroslav Lichvar: Round the TSC calibration results to
> the nearest 100ppm. Although I suspect we already see variations beyond
> 100ppm, so some tweaking would probably be necessary. I'll be looking at
> this option soon.

This does not sound good. Say, e.g., the variations were 40 ppm. Then, with
luck, for some hardware you can get rid of the variations completely. But,
if the average value for some hardware is near the value where you decide
either to round up or down, it will amplify the variation to 100 ppm. I
think you can't reduce the average of the variations for an ensemble of
computers this way.

> 2) Provide a workaround (that doesn't create some sort of userland API
> we have to manage forever) for users who really care about the
> super-fine details of tsc calibration and its interactions with NTP.
>
> This patch only provides #2 above.

I have used this method on my campus ntp time servers for over a year now. I
just didn't know how to make a command line parameter, so I just wrote a
constant value to cpu_khz in tsc.c, instead. The command line option is much
better, of course.

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