Re: [chrony-dev] PPSAPI: kernel consumer

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


On Mon, Feb 08, 2010 at 12:35:59PM +0100, Håkan Johansson wrote:
> 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.

Which clocksource was used? The best results should provide tsc,
usually few tens of nanoseconds. From some tests I did a while ago it
seems to worsen with more CPU cores.

> 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.

Yes, but the frequency is not adjusted directly to the difference
between the last two measurements, that would be extremely noisy. The
kernel PPS discipline uses FLL (fast convergence, but sensitive to
noise), ntpd uses PLL (slow convergence, but handles noise well) and
chrony uses linear regression on up to 64 samples.

-- 
Miroslav Lichvar

---
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


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