[ntp:questions] Attn Linux distributors - pse include PPS
unruh at invalid.ca
Sun Apr 27 15:47:21 UTC 2014
On 2014-04-27, Rob <nomail at example.com> wrote:
> Several years ago I wanted to sync my clock to a GPS providing PPS.
> At that time, PPS support in the kernel was only available as a set
> of patches. You had to apply them to a kernel source tree and rebuild
> the kernel. And I think there were several competing patchsets.
> You also needed to build a program that would actually bind the PPS
> to a device pin.
> Not wanting to go through all that trouble, I wrote the part of the
> gpsd program that takes the PPS info in a userspace thread and puts
> the information in an SHM segment that ntpd can use as a refclock.
> Support for PPS without having to patch or recompile existing binaries.
> This worked well, but lately I have been working on a project that has
> more strict timing requirements and I investigated the current state
> of things w.r.t kernel PPS.
> PPS support has been incorporated in the kernel. Distributors compile
> kernels with PPS support built in, and include modules for parallel,
> serial and gpio ports. Things are looking good.
But those modules give timing to one a few (5-10) usec. because of
interrupt handling issues. Your shm solution would seem to me to be more
than adequate for any timing requirements if they can be solved with an
interrupt driven pps.
> ntpd has support for this kernel PPS in its source tree. Availability
> of PPS API is autodetected, and ntpd refclock drivers are using it.
> Linux distributors compile ntpd with a (default) set of options that
> basically says: please include all refclock drivers that are supported
> on this system. Fine!
> BUT STILL IT DOES NOT WORK
> Why? Because a single file was missing during compilation.
I agree that ntpd should supply that file. It would cost nothing, unless
it is true that that file differs depending on distribution/kernel/...
> And when I suggest to fix that, all kinds of reasons are popping up
> why this isn't going to happen, isn't wanted, etc.
> I think it is a big waste of effort made by many people who contributed
> to what we now have. Pity.
More information about the questions