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

Michael Meier Michael.Meier at rrze.uni-erlangen.de
Sun Jan 11 22:54:33 CET 2009


> The absolute value basically only tells you how long your system takes 
> for executing a system call.
> This should however not have a bad effect on timekeeping, as that 
> overhead is pretty constant, so it will give you an constant offset.

I would like to take that back. Because the precision value it computes 
there is used later, in the following codesnippet from libntp/systime.c:
         /*
          * ntp_random() produces 31 bits (always nonnegative).
          * This bit is done only after the precision has been
          * determined.
          */
         if (sys_precision != 0)
                 dtemp += (ntp_random() / FRAC - .5) / (1 <<
                     -sys_precision);
So: It seems to add (or subtract) a random value in the order of the 
computed precision to every time it gets from the kernel... Ain't that 
just great...
I've taken the liberty of commenting out that codepiece, I'll see how 
that goes...
-- 
Michael Meier, HPC Services
Friedrich-Alexander-Universitaet Erlangen-Nuernberg
Regionales Rechenzentrum Erlangen
Martensstrasse 1, 91058 Erlangen, Germany
Tel.: +49 9131 85-28973, Fax: +49 9131 302941
michael.meier at rrze.uni-erlangen.de
www.rrze.uni-erlangen.de/hpc/



More information about the LinuxPPS mailing list