[LinuxPPS] ldattach + Debian Lenny - Epilogue

Hal V. Engel hvengel at astound.net
Mon Jun 8 17:38:37 CEST 2009


On Monday 08 June 2009 07:53:16 am Udo van den Heuvel wrote:
> Felix Joussein wrote:
> > Regarding the "not working" ldattach:
> > I think, I have not clearly said, what I meant, so here an other try:
> >
> > Using Kernel 2.6.30-rc5 + ntp-pps-v2.6.30-rc5-bis.diff:
> >
> > ldattach 18 /dev/ttyS0 creates /dev/pps0
> > ppstest does not retrieve any data, and the files "assert" and "clear"
> > don't increase.... standing still - both 0.00000000#0.
> >
> > Using Kernel  2.6.28 + ntp-pps-2.6.28-rc6-bis.diff:
> > ppsldisc /dev/ttyS0 creates /dev/pps0
> > ppstest works fine but ntp sync takes an eternity.
>
> The sync time might be due to bad parameter in the kernel, patch was
> discussed on this list. Maybe 2.6.30? (anyone?)

In the linux kernel source tree in include/linux/timex.h change

#define SHIFT_PPL  4

to a lower value.  It looks like in 2.6.31 that this is going to be changed to 
2.  Having looked at the code any value >=0 will not cause significant 
problems (IE. kernel crashes) and the only concern is that lower values may 
make your clock unstable.  I have been using 1 with no bad affects and my 
clock will get offsets below +-5us only a few minutes after a reboot.  Even 
under the worst conditions (IE. highly variable system loads and fluctuating 
ambient temperatures) it still holds offsets below +-5us and under more normal 
conditions under +-1us.  The jitter and stability numbers reported by ntp are 
the same as I was seeing with SHIFT_PPL 4.

You probably also want to use -g/--panicgate when you start your ntp daemon 
since this will cause an initial step to sync the clock.  Along with this I 
set

tinker step 0.0010 

in my ntp.conf.  This setting may be a little aggressive. This setting means 
that if the clock is off by more than 10ms at startup that ntp will step the 
clock to sync it to the reference clock.  The default value for this is 128ms.  
Typically ntp will get the initial sync to with in 40us on my system.

The default values of these tuning values are optimized for network based 
reference time sources where there is lots of jitter and delay and are 
suboptimal for locally attached reference clocks which have much lower amounts 
of jitter and no delay. 
 
>
> > And here is the bug surprise:    ldattach also works!
> >
> > Where else is the error? What causes the malfunction?
>
> I think this one is for Rodolfo to compare?
>
>
> Kind regards,
> Udo
>
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support




More information about the LinuxPPS mailing list