[LinuxPPS] cross posting [time-nuts] NTP API on Linux 2.6.26

Hal V. Engel hvengel at astound.net
Sun Jan 11 21:54:28 CET 2009


On Sunday 11 January 2009 02:07:49 James Boddington wrote:
> Hal V. Engel wrote:
> > Have you patched glibc with the nanosecond patch set located here
> > http://sourceware.org/ml/libc-alpha/2008-03/msg00076.html ?  Without this
> > or the ntp patch that Michael Meier posted to the list yesterday
> > http://www.mulder.franken.de/blogfiles/timex.h ntp will only be capable
> > to doing microsecond timing.
>
> I don't get this bit. Linuxpps gets ns time stamps. I use the atom driver
> which uses ns. Ntp gives ns offsets to the kernel.
>
> I have my kernel setup to report both the offset from pps and the offset
> that ntp gives it. The ntp offset looks like a filtered version of the pps
> offset and both are ns.
>
> Unless this is a later change I am missing. I am using glibc 2.6.1 with the
> changes to timex.h I have posted here in the past and my modified 2.6.24
> where I back ported the nano stuff from an Andrew Morten kernel that was
> somewhere between 2.6.25 and 2.6.26 at the time.

The patches for glibc, the ntp patch supplied by Michael Meier and your 
timex.h patches are all variations on the same theme.  The glibc patch set and 
the Michael Meier patches are more complete than the patches you supplied 
(almost 6 months ago) since they fix the ntp_gettime function which is now 
broken in glibc with these newer kernels.  But your kernel may not have the 
changes that require the ntp_gettime() fix.  

Ultimately glibc will need to be fixed but in the mean time all of the above 
fixes seem to work OK.  I have successfully used your patches on my system.  I 
am now using the glibc patch and it works.  I have not used the Michael Meier 
patch but it appears that this should work also.

Hal



More information about the LinuxPPS mailing list