Re: ntp.c : possible inconsistency?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 10 Jan 2007, Bernhard Schiffner wrote:

> trying to find reasons for some crazy ntpd-behavior I read
> http://lkml.org/lkml/2006/10/27/67
> 
> This thread doesn't result in a pulished patch, so I (hopefully) did what was 
> said there. The patch doesn't break my system, but it doesn't change ntpd's 
> crazyness too.
> Nevertheless it should be discussed again in the sense of preventing an 
> inconsistency.

Without a further explanation of this craziness, it's a little hard to 
discuss...

> PS:
> Can someone point me to the reason for doing txc->constant + 4, please?

The main reason is this part in ntpd/ntp_loopfilter.c of the ntp package:

        if (pll_nano) {
                ntv.offset = (int32)(clock_offset *
                    1e9 + dtemp);
                ntv.constant = sys_poll;
        } else {
                ntv.offset = (int32)(clock_offset *
                    1e6 + dtemp);
                ntv.constant = sys_poll - 4;
        }

It uses the pll_nano switch to distinguish between the old and new ntp 
model. The kernel now implements the new ntp model, but the actual 
userspace interface hasn't changed yet, so the kernel undoes the 
compensation.

Here is bit more information about where this adjustments comes from:
http://www.ntp.org/ntpfaq/NTP-s-compat.htm#Q-COMPAT

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux