Let's get rid of pivots

Gary E. Miller gem at rellim.com
Tue Apr 18 19:06:44 UTC 2017


Yo Hal!

On Tue, 18 Apr 2017 11:38:30 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> esr at thyrsus.com said:
> > Hm.  I need to stare at that code some more.  I'm beginning to
> > think the pivot is the right idea implemented in a slightly wrong
> > place.  Maybe it ought to be applied to in-packet timestamps as
> > soon as they arrive?   
> 
> "as soon as they arrive" seems ugly to me, but maybe that's just
> because I've been thinking of using l_fp to compute an offset and
> using the offset to adjust the time with an effective pivot of "now".

By far I agree, all we need from the received l_fp is the offset
from the local clock, modulo 64 bits of l_fp.

But, there is one important case.

Let's take our poor new RasPi that wakes up thinking it is 1Jan1970.

After being awake 5 seconds it sends an l_fp of 1Jan1970 to a remote
chimer, and gets back an l_fp if 2Jan1970.  A delta of one day.

Somehow the RasPi needs to know if that delta of one day means
the time is really 2 Jan1970, or 2 Jan 2138, or 2 Jan 2306?

Once that initial jump is made the following deltas will be small,
much less than 1 hour likely, but even decades would still work nicely 
with 2s complement deltas..  Until the next reboot to 1Jan1970.

Nail that one big case and all the little ones go away.

> An alternative approach would be to get rid of pivots totally.  If we
> removed all of the pivot code and logic from the current code, it
> will work until 2036.  How long will it take to implement and deploy
> a new version of ntp protocol with enough bits?

Or pivot on 2015 and delay the problem until 2183?
 
> My straw man would be 64 bits of ns.  That's 500+ years.  (if I did
> the math right)

l_fp is almost that, it is 64 bits of about 233 ps.  Which works out to
168 yeats.  You mean 64 bits of seeconds?  Like timespec(64)?

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/20170418/864c2b76/attachment.bin>


More information about the devel mailing list