On 9/28/16, Gary E. Miller <[email protected]> wrote: > The knerel PLL and the ntpd userspace PLL are supposed to be using the > same algorithm and constants. Might be worth checking if the constants > are still the same.
They aren't. In ntp_loopfilter.c, we have #define CLOCK_PLL 16. /* PLL loop gain (log2) */ but that "(log2)" is a lie; check everywhere CLOCK_PLL is used and it's in multiplication and division, not bitshifts. The kernel PLL's equivalent variable is called SHIFT_PLL, and really is log2. So if SHIFT_PLL were 4, that would be equivalent. But since Linux kernel 2.6.31, it's been changed from 4 to 2, which means it's less damped than the userspace PLL. Last I checked, FreeBSD still uses SHIFT_PLL=4. The Linux kernel PLL has had a *lot* of refactoring that the NTP codebase hasn't. So there are probably a lot of other differences I haven't noticed and it's possible that comparing constants doesn't even make sense any more. _______________________________________________ devel mailing list [email protected] http://lists.ntpsec.org/mailman/listinfo/devel
