regarding excising PLL
Hal Murray
hmurray at megapathdsl.net
Tue May 3 22:13:04 UTC 2016
fallenpegasus at gmail.com said:
> At the F2F this weekend, ESR brought up that you think we may be able to
> excise the PLL code from NTPsec.
> Can you expand on that, please?
It's more complicated that a simple excise.
My knowledge may be buggy. It's not clear that any of this makes Eric's job
easier.
There are two RFCs describing PPS stuff.
RFC 1589, 37 pages
A Kernel Model for Precision Timekeeping
https://tools.ietf.org/html/rfc1589
RFC 2783, 31 pages
Pulse-Per-Second API for UNIX-like Operating Systems, Version 1.0
https://tools.ietf.org/html/rfc2783
The second is the API to read the info the kernel captures when a PPS type
pulse happens and all the stuff to turn it on/off and such.
The first describes a PLL that lives in the kernel. I thought the RFC
included large code fragments, but I didn't see them. The idea is that ntpd
hands off timekeeping duties to the kernel and the kernel does all the work.
ntpd just monitors things and tells the kernel to stop if things get out of
whack.
Why is there that much code in the kernel? I think that's leftover from when
machines were slow and busy and schedulers were dumb.
I think it should be possible to wake up user code on the PPS, read the time
stamp, do the calculations in user land, and tell the kernel what to do all
within a reasonable amount of time. That's basically moving the inner loop
of the kernel PLL out to user land. One complication in this area is that
most kernels don't implement the wake-on-PPS option. ntpd polls.
The part of this area that I don't understand is the PLL parameters. ntpd
already adjusts the polling rate and along with that various parameters.
Will the pseudo-kernel mode work at the extreme end of the normal parameters
or is the kernel PLL totally different?
------
Linux has rewritten that area. Several years ago, there was a time when
there was no kernel PLL. ntpd kept on working. We should be able to comment
out a few lines of code and just try it to see how well/poorly it works.
It would be interesting to compare various OSes running on the same hardware.
--
These are my opinions. I hate spam.
More information about the devel
mailing list