✘adj_systeim()
Gary E. Miller
gem at rellim.com
Sun Mar 12 02:24:52 UTC 2017
Yo All!
I have been tracking a loss of precision error and found something I
dislike. Eric thinks I must be mistaken, so I need a tie breaker.
First in ntpd/ntp_loopfitler.c:
adj_host_clock() is called once a second to correct the sysclock.
It calls adj_systime() with the offset to fix, as a double.
I see no other path to adjust the system clock, unless HAVE_KERNEL_PLL
is defined and direct to kernel PPS is used. Something I have never
done, but is common on BSDs.
Moving to libntp/systime.c:
adj_systime() converts the offset to a timeval, which is in micro seconds.
Then adj_systeim() calls adjtime(3) indirectly. adjtime(3) is also
in micro seconds.
I added print statements so I know that is the path my systems are taking.
I can find no other possible path, other than the KERNEL_PLL which takes
special configuration.
Did I miss something? Taht would explain why people have a hard time
gett much better than micro second stability.
Another bit of weirdness, adj_system() always calls adjtime(3) directly.
But it only does so by indirection by way of ladjtime parameter.
Since it always calls adjtime the indirection is pointless.
My next step is to try to figure out how to use STA_OFFSET mode in
nanoseconds with ntp_adjtime_ns().
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170311/04713c7e/attachment.bin>
More information about the devel
mailing list