lkml.org 
[lkml]   [2009]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tsc_khz= boot option to avoid TSC calibration variance
Date
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).


\
 
 \ /
  Last update: 2009-05-12 15:51    [W:0.066 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site