[ntp:hackers] odd behaviour (one more time)
brian.utterback at sun.com
Tue Sep 9 18:39:48 UTC 2008
Can you tell us what has to change to accommodate different ticks?
Solaris uses both 100Hz and 1000Hz, settable at boot time. I would
like to verify that the contestants are correctly scaled in these two
David L. Mills wrote:
> There have been three versions of the kernel code since 1992, the
> microkernel (Solairs), nanokernel (1994) and nanokernel with TAI (1998).
> So far as I know, Linux has used the 1998 version but without TAI. The
> microkernel version and nanokernel versions differed in the scaling of
> poll interval to time constant. In the former the time constant is
> reduced by four; in the latter the time constant is equal to the poll
> The generic timex.h header file correctly accounts for all three
> versions, but the various OS versions have adopted their own version
> with and without errors. However, the STA_NANO should be present in the
> timex.h file so that the ntp_loopfilter.c knows what interface and what
> scaling should be used. The STA_PLL bit in the status word is no longer
> used, as the capability to to microsecond precision is inconsistent with
> the hardware clock interpolation.
> Another nit with Linux is that some configurations come up with the
> timer frequency of 1000 Hz rather that the design parameter of 100 Hz.
> It is possible, and indeed is the case for Ultrix (256 Hz) and OSF/1
> (1024 Hz) to change the loop parameters to match any frequency, but
> Linux hasn't done that.
> Jim Houston wrote:
>> On Tuesday 09 September 2008 03:07:25 clemens at dwf.com wrote:
>>> I had also looked at the list of things that KERNEL_PLL depended on
>>> in the
>>> configuration code, and was sure that none of those were defined, again,
>>> wrong timex.h .
>>> So, what is the problem here, and what is the solution?
>>> Are wrong time constants being used in the Linux kernel when STA_NANO is
>>> set? Should this code NOT be being included for Linux?
>>> And why in my p127 but not p115?
>> Hi Reg,
>> The problem is that ntpd and the kernel need to come to a common
>> understanding of the meaning of the time_constant value. I don't
>> know how to make that happen.
>> The current use of #ifdef STA_NANO to decide if the time_constant
>> should be sys_poll or sys_poll-4 means that the timex.h and the kernel
>> need to match. In previous versions of ntpd there was code which checked
>> if the STA_NANO (or perhaps MOD_NANO) flag could be set. It used this test
>> to choose between the microsecond or nanosecond interface. This allowed
>> switching between microsecond and nanosecond versions of the kernel
>> code without having to have two versions of ntpd built with two versions
>> of timex.h.
>> I got a bounce message from ntp:hackers on my last message
>> saying, that it was waiting for the moderator to decide if it should be
>> sent to the group. Maybe you could summarize our discussion and
>> post it.
>> I hope this helps.
>> Jim Houston - Concurrent Computer Corp.
> hackers mailing list
> hackers at lists.ntp.org
There are two rules in life:
Rule 1- Don't tell people everything you know
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
More information about the hackers