[LinuxPPS] precision

Cirilo Bernardo cbernardo at auspace.com.au
Wed Oct 31 13:01:24 CET 2007


>> OK, so how could we tune/configure the kernel to get maximum performance?
>> Do we need highres clocks for precision?
>> TSC? HPET?

TSC will not work; the experiment with TSC in Linux went horribly wrong
because TSC hardware acts differently in different devices and its
clock is not usually constant - it steps with the CPU clock.

>> How many HZ in the kernel?
>> (not HZ-less?)
>> Etc
>>
> It seems to get more precision we would need an actual nano-second clock
> in Linux.
>
> We had that for a while with Ulrich's patch, but it (the patch) touched so many
> things that it never got in.
>
> Today, we would probably need Poul-Henning Kamp's Timecounters patch
> from FreeBSD to get actual nano-second time, and Im not sure how many
> hardware platforms that has been adapted to.

I use 'getnstimeofday' to get a struct timespec but I have no idea what the
kernel implementation is like.  The granularity is definitely not on the
low nsec level though.

If you're serious about still better performance, a high-speed counter driven
from a compact Rubidium-locked frequency standard and with a latched buffer to
show the count as the PPS interrupt signal was generated will give you a
precision of roughly 100nsec.  Given other factors, you cannot achieve much
better than that without spending ridiculous amounts of money. With all the
propagation delays etc, and even compensating for line delay and atmospheric
transmission, I doubt any reasonable solution will give you better than 50nsec.
Just look at the GPS spec on the jitter of the PPS - that's typically already
over 100nsec.

Even just to overcome the IRQ latency would involve a high-stability oscillator
and a counter - not necessarily the specs of the Rubidium standard, but you
have to remember that this reference oscillator itself does drift - the Rubidium
clock on the other hand is an incredibly stable oscillator.

The questions to ask are:
What precision do you want?
What precision do you need?

- Cirilo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20071031/f71fb45a/attachment.htm


More information about the LinuxPPS mailing list