[ntp:questions] Re: Linux Kernel functions usef by NTP for controlling the system clock
david at djwhome.demon.co.uk
Sat May 27 10:48:33 UTC 2006
in article <3351bfbe0605231922k29f8ad4alf930545eaa7bab29 at mail.gmail.com>,
ndprasad at gmail.com (DeviPrasad Natesan) wrote:
> When does the NTP takes decision on changing the "offset"
> (ADJ_OFFSET_SINGLESHOT) and when "tick" (ADJ_TICK).
For version 4.2.0, never:
david at djwhome:~/ntp-4.2.0$ find . -type f | grep ADJ_OFFSET_SINGLESHOT
david at djwhome:~/ntp-4.2.0$
However, I think the answer to question that you are really trying
to ask is: in ntpd/ntp_loopfilter.c. If I remember correctly, this
roughly corresponds to, in the default configuration of the source code,
step if offset exceeds 128ms for an extended period, otherwise slew.
> Is there any provision to control the frequency of the osciallator if
> we have an TCXO or OCXO without changing the "tick" in the kernel to
No. Any such mechanism would have to be calibrated to obtain the same
loop gain as the purely digital approach, although I'm not sure that
anything is dependent on 100% accuracy.
The other problem is that, on good systems, the correction calculations
are performed on every clock tick, at interrupt level. You would probably
have to revert to correcting every 4 seconds, at application level,
potentially resulting in less accurate time keeping when rates were
More information about the questions