[ntp:questions] ntp discipline of local time?
David Woolley
david at ex.djwhome.demon.co.uk.invalid
Tue Mar 25 21:52:46 UTC 2008
Unruh wrote:
> David Woolley <david at ex.djwhome.demon.co.uk.invalid> writes:
>
>
>> If you are using the kernel time discipline, which you should be using
>> for high accuracy, nptd doesn't discipline the clock; it is the kernel
>> code that does that, based on measurements provided by ntpd.
>
> I do not think that this is right, unless you are referring to a PPS
> sounce. ntp sets the frequency of the kerhel clock (Is that change in
> frequency what you mean by kernel time discipline) by a very simple second
> order PDE feedback, and the offset by and exponential first order feedback
> scheme. At least that is what it looks like to me trying to read
> ntp_loopfilter.c
>
2.4 kernel (2.4.33): /usr/src/linux/kernel/timer.c
417 /*
418 * Compute the phase adjustment for the next second. In
419 * PLL mode, the offset is reduced by a fixed factor
420 * times the time constant. In FLL mode the offset is
421 * used directly. In either mode, the maximum phase
422 * adjustment for each second is clamped so as to spread
423 * the adjustment over not more than the number of
424 * seconds between updates.
425 */
loopfilter.c feeds the kernel with offset when it has a time update and
it is in PLL mode. Note that a simple exponential decay is an IIR filter:
From ntp v4.2p4: ntpd/ntp_loopfilter.c
172 #define MOD_BITS (MOD_OFFSET | MOD_MAXERROR | MOD_ESTERROR | \
173 MOD_STATUS | MOD_TIMECONST)
gives the default set of ntpadjtime mode options.
More information about the questions
mailing list