[ntp:questions] how to have offset < 1ms

Miroslav Lichvar mlichvar at redhat.com
Fri Apr 16 11:37:32 UTC 2010

On Thu, Apr 15, 2010 at 03:44:21PM +0000, unruh wrote:
> On 2010-04-15, Miroslav Lichvar <mlichvar at redhat.com> wrote:
> > Userspace timestamps may decrease the accuracy by more than just 0.5
> > us. When I compare kernel timestamps and timestamps from gpsd, there
> > is a 20-40us difference, even when the gpsd process has real time
> > priority and the machine is otherwise idle.
> OK, I have wondered about this. Have you tried to control the
> interrupts?  Ie, run a program which times and puts out data on say one of
> the parallel port lines and run that into the serial port interrupt line
> so you can actually see the difference in time between the assertion of
> the signal and the receipt of the signal by gpsd/serial port? 

No, I'm not sure how would I do that.

But I tried switching the PPS signal connection between parallel and
serial port and compare offsets. The pulses from serial port were
coming about 2.5-3 us later and jitter was same for both, about 1 us.

It would be interesting to see if the parallel port latencies are
better with the Alexander Gordeev's LinuxPPS parport client. It's able
to capture clear events by polling, so there is no interrupt latency.
Unfortunately I wasn't able to get it working as it requires assert to
happen only few microseconds before clear.

Miroslav Lichvar

More information about the questions mailing list