Re: [chrony-dev] PPSAPI: kernel consumer

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


I've tested chrony's PPS driver and I'm really shocked with its
synchronization quality. It is a HUGE improvement over ntpd. It was
hard to believe that it can sync clock with a precision of 1-2us but
it is true. However, my new kernel consumer seems to be able to keep the
same precision, but it can sync faster (in few seconds).

I think chrony could do that too if the kernel interface allowed a
tight loop.

This could be an extension to adjtimex which would allow us to know
either remaining singleshot adjustment (ideally in nanoseconds) or
when exactly did the last change in frequency happen.

I'd agree that a user-space application should be able to synchronise just as well as the kernel, provided the interfaces for both controlling the clock _and_ doing accurate measurements are available.

I've recently (for slightly other reasons) measured the in-kernel time consumed by doing getnstimeofday() (several in a row), and for most machines (2 GHz+) it took a whopping ~ 500 ns. I.e. one cannot know to better than 0.5 us what the time was, if one e.g. try to sandwich something else with two such calls. The best machine was actually a slower one (~1.05 GHz) that had about 60 ns between return values for two back-to-back getnstimeofday(). I suppose we are down to PCI bus latencies and so on.

Synchronisation would mean both to determine the offset, and the gain to keep the clock correct futurewise? With the gain being the harder part --- if measurement precision is 1 us, then over a 1 s time-span, only 1 ppm accuracy is obtained.

Cheers,
Håkan


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/