Messages in this thread | | | From | Serge Belyshev <> | Subject | Re: [PATCH] tsc_khz= boot option to avoid TSC calibration variance | Date | Tue, 12 May 2009 17:20:00 +0400 |
| |
john stultz <johnstul@us.ibm.com> writes:
> Once the tsc_khz value is set in grub, the box will always boot with the ^^^^^^ > same value, so the NTP drift value prior to reboot will still be correct > after rebooting. No, it won't, because...
> tsc_khz = calibrate_tsc(); > + > + /* > + * If the calibrated TSC freq and user specified > + * TSC freq are close enough, pick the what the > + * user told us. > + */ > + difference = abs(tsc_khz - tsc_khz_specified); > + if (difference <= tsc_khz >> 10) { /* 1/1024 = 976 ppm */ > + printk(KERN_INFO "Using user defined TSC freq: %lu.%03lu MHz\n", > + tsc_khz_specified/1000, > + tsc_khz_specified%1000); > + tsc_khz = tsc_khz_specified; > + } > +
... of this "if".
Please *please* don't set arbitrary limits. Just use user supplied value.
Or at the very least print big red warning if you are going to ignore a user supplied option (and have another tsc_khz_really= option to override faulty calibration routine).
| |