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

unruh unruh at invalid.ca
Tue Feb 26 00:57:22 UTC 2013

On 2013-02-26, ramadog at gmail.com <ramadog at gmail.com> wrote:
> On Tuesday, February 26, 2013 6:32:53 AM UTC+10, unruh wrote:
>> When I ran a test many years ago I used a program to put out a rising
>> pulse onto one of the printer port output pins, and then connected that
>> to the parallel port nack pin. I timestamped the time just before I put
>> out the pulse, and the time at which the interrupt occured and got
>> roughtly 1 to 2 microseconds delay. Ie, the interrupt service was of the
>> order of 1us.  12us seems really long. Now this might be a difference
>> between the serial and parallel interrupts or a difference in the
>> interrupt sevice routine, but 12us still seems a long time. 
> Awhile back when I did similar using a parallel port pin to trigger dcd with 
> the p3-600 I am currently using for my ntp server there was an average of 2.6us 
> difference between the 2 time stamps.
> For pps I use a time stamp taken at the beginning of handle_irq() in 
> arch/x86/kernel/irq_32.c. Using a 3.5.7 kernel there is a 11us difference 
> between that time stamp vs the serial pps time stamp taken in the ldisc code. 
> Add some cpu load and the difference climbs to 14us. The 12us delay mentioned 
> above is close to what I am seeing.

Hm. That tells me that ldisc code really is pretty bad. In my case I
used a parallel port module which I adapted from "Linux Device Drivers"
by Alessandro Rubini and Jonathan Corbet. to time the parallel port IRQ
handling. And I only saw 1-2 us difference. Why are you getting 12us on
the ldisc code?

More information about the questions mailing list