[LinuxPPS] PPS kernel discipline

Thorsten Mühlfelder thenktor at gmx.de
Wed Mar 25 16:32:34 CET 2009


On Wed, 25 Mar 2009 16:00:34 +0100
Udo van den Heuvel <udovdh at xs4all.nl> wrote:

> Thorsten Mühlfelder wrote:
> > As you can see the status is "pll nano" but it should be something like
> > "pll ppsfreq ppstime ppssignal nano". 
> 
> Oh?
> ntpdc -c kern gives here an ouput similar to yours.
> Works fine!
> 
> What is missing?
> Why is it important?

Imagine following setup:

Server A <--- GPS
  |
  |
Server B <--- HP cesium frequency normal

Server A gets it's timestamps from GPS.
Server B gets it's timestamps from Server A and PPS from the HP cesium. Server A is marked as prefer because otherwise PPS won't work.

As soon as GPS signal or connection to Server A is lost, server B won't be syncronized by PPS anymore, because the ntpd needs a prefer peer.
Therefore you have the kernel discipline in PPSkit and the BSD kernels: Kernel is synced directly via PPS without the need of a ntpd.

David Mills says:
Once the kernel PPS is lit, it will stay lit even if the daemon loses
the prefered soure or even dies.This is the intended behavior, which I
confirmed just now. Veriy that  ntptime shows PPSTIME lit after the
daemon loses the prefer peer or is stopped. 

The ntpd docs say:
The driver normally operates like any other driver and uses the same
mitigation algorithms and PLL/FLL clock discipline incorporated in the
daemon. If kernel PLL/FLL support is available, the kernel PLL/FLL
clock discipline can be used instead. The default behavior is not to
use the kernel PPS clock discipline, even if present. This driver
incorporates a good deal of signal processing to reduce jitter using
the median filter and trimmed average algorithms in the driver
interface. As the result, performance with minpoll and maxpoll
configured at the minimum 4 (16s) is generally better than the kernel
PPS discipline. However, fudge flag 3 can be used to enable the kernel
PPS discipline if necessary.
When kernel PPS support is enabled, the PPS driver can direct the signal 
directly to the kernel. Note that the PPS driver does not normally enable 
the PPS kernel, since performance is generally better with older systems. 
However, the kernel can be enabled by a driver fudge flag if necessary. 
This is advised for newer machines in the Pentium class.
The kernel maintains a watchdog timer for the PPS signal; if the signal
has not been heard or is out of tolerance for more than some interval,
currently two minutes, the kernel discipline is disabled and operation
continues as if it were not present. 

So for machines Pentium class and better, the kernel discipline should be used.



More information about the LinuxPPS mailing list