[LinuxPPS] [PATCH 02b/12] PPS: Make pps_event capturing lockless.

Bernhard Schiffner bernhard at schiffner-limbach.de
Tue Feb 10 10:25:00 CET 2009


On Tuesday 10 February 2009 04:57:48 George Spelvin wrote:
> Rather than using spinlock mutual exclusion between pps_event
> and PPS_FETCH, store captured timestamps into a circular buffer
> and atomically update the sequence number to publish them to
> PPS_FETCH.
>
> This technically has a race if more than 5 pps_events of a single type
> arrive during one PPS_FETCH; given a typical 1 Hz rate, is that really
> likely?
(general)
pps does timestamp interrupts.
It's regular use is real "PPS". But it'is not limited to this.

(more then5 events)
PPS-events derivated form TAI (as in GPS-receivers) are very close together in 
their slopes  (<1µs).
If you want this accuracy it makes no sense to use more then one (reliable) 
source. 
If you use two similar sources their respective interrupts block each other (a 
"long" time, ca. 30 µs) before getnstimeofday() can happen. This does not 
improve accuracy...
So 5 "parallel" events should be ok FAPP.

Bernhard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20090210/67a624ba/attachment-0001.htm 


More information about the LinuxPPS mailing list