lkml.org 
[lkml]   [2009]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date8 May 2009 11:12:48 -0400
From"George Spelvin" <>
SubjectRe: [RFC][PATCH] tsc_khz= boot option to avoid TSC calibration variance
> Wouldnt it be a lot more flexible to have a sysctl for this, which 
> would be set before ntpd is started? (or which would be set by ntpd)

I thought so, but a boot-time option is sufficient and simpler.

> The mechanism and semantics would be similar: we would _not_ expose
> cpu_khz directly, we'd have a boot_cpu_khz value saved for sure, and
> we'd allow the sysctl to set the cpu_khz to within 1MHz of cpu_khz -
> and we'd re-scale the timer irq and other calibrated values
> accordingly.

Yes, that would be nicer.

> Alternatively, a much simpler method: why doesnt ntpd save its own
> notion of cpu_khz once it has reached stability, and reads cpu_khz
> (from /proc/cpuinfo) during bootup and re-scales its initial offset
> and phase shift accordingly, compensating for that noise? (if it's
> within 1MHz)

The problem is, it's only an issue if the TSC is used as the system
time base, which is a kernel detail that a) NTP really doesn't want to
be bothered with, and b) can change at run time.

It's possible, but it feels like a kludge. It's such a Linux-specific
detail that it seems cleaner to fix it at the source.


\
 
 \ /
  Last update: 2009-05-08 17:15    [from the cache]
©2003-2010