[ntp:questions] How do I validate my PPS clocks?

unruh unruh at invalid.ca
Wed Feb 27 18:03:18 UTC 2013


On 2013-02-26, ramadog at gmail.com <ramadog at gmail.com> wrote:
> On Tuesday, February 26, 2013 10:57:22 AM UTC+10, unruh wrote:
>> handling. And I only saw 1-2 us difference. Why are you getting 12us on
>> the ldisc code?
>
> The 11us in my case is how long it takes to get from early in the interrupt 
> code in arch/x86/kernel/irq_32.c to where the time stamp is normally taken for 
> the pps.
>
> o127.127.22.0    .PPS.            0 l    5   16  377    0.000    0.000   0.001
>  127.127.28.0    .SHM.            0 l    4   16  377    0.000    0.011   0.001
>
> That is from a new kernel I have had running for around an hour. The .PPS.
> time stamp is unmodified from the ppsapi and the .SHM. time stamp is taken
> at the beginning of the interrupt code. Using /proc to export my time stamp
> and the shm driver to feed it to ntp. 
>
> Getting the same 11us difference I see with my normal kernel. Normally I use
> the earlier time stamp because it has less jitter and is affected less by
> cpu load. 

Is it possible that some other module is getting the interrupt and
servicing it, before your module that is feeding pps gets it? 11us
sounds a lot like the kind of time a interrupt service would take. This
would mean that every time and interrupt came on your line (serial port
I assume) something else was in an interrupt service which means that
that interrupt was triggering that other routine-- ie it was trying to
service the same interrupt. Either that or the pps-ldisk routine is
really really really badly written.  It would be worth trying to track
this down.



More information about the questions mailing list