[LinuxPPS] rt?

Hal V. Engel hvengel at astound.net
Tue Mar 24 04:15:27 CET 2009


On Monday 23 March 2009 01:04:50 pm Bernhard Schiffner wrote:
> On Monday 23 March 2009 18:21:56 Udo van den Heuvel wrote:
> > Do we need realtime patches?
> >
> >
> > http://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
>
> As usual: it depends.
>
> If you can guarantee pps is the only interrupt: no

Very rare case since even a basic network time server appliance will have 
interrupts from sources (like the network device) other than the PPS device.

> If you can't: perhaps
> If you have an bloated, highly loaded, unpredictable desktop-system: yes
>
> The main difference between mainline and rt is teh use of threaded
> interrupts. (Quasi all the other rt-topics got merged already.)
>
> Threaded interrupt means, that the order to of processing interrupts is
> given by the scheduler. The scheduler is "easily" configurable.
>
> Remember: rt means predictable, not fast.

Predictable may be more important than fast for the PPS case since this would 
imply reduced jitter.

> (It adds an other indirection in the pps-case)
>
> Bernhard

One of the things that it does allow you to do is to change the priority of 
the various interrupts on a system.  So it should be possible to increase the 
priority of the serial port (or para port) interrupt used for the PPS line.  
As Bernhard points out this may not make PPS interrupt handling faster since 
there is more indirection but it may make it more consistent (IE. reduce the 
variability of the latency between when the pulse happens and when the 
interrupt handler actually does it's work).  This may not make much difference 
for most machines since it appears that the affects of variability in the 
latency of the PPS interrupt handler are swamped by things like temperature 
affects on the oscillator.  But it could make a measurable difference on a 
machine with a high stability ovenized or temperature 
compensated oscillator.   This is very rare since it requires that the 
machine's motherboard be modified.  The only one here, that I am aware of, who 
has such a machine is Remco and he is not using LinuxPPS on that machine.

My machine is much like the third of Bernhard's categories.

> If you have an bloated, highly loaded, unpredictable desktop-system: yes

And since I run Gentoo I can get an rt patched kernel using the pro-audio 
overlay so this should be easy to test.  But I don't expect it to make much 
difference on most machines.  

I now have the rt kernel running and I have the serial IRQ running at the 
highest system priority by using rtirq that has had serial added to it's 
config file.  

Setting IRQ priorities: start [serial] irq=3 pid=4651 prio=90: OK.

But at this point I don't know if this has made any difference that I can 
detect as far as timekeeping goes.  But I can say that my machine feels more 
responsive with the rt kernel.  I will report back on how this appears to 
affect timekeeping.

Hal





More information about the LinuxPPS mailing list