ntpd and High resolution timer - NTP

This is a discussion on ntpd and High resolution timer - NTP ; Hi everybody, I am using NTPd and I have guessed that it uses the High Resolution Timer, brought to the linux kernel since the 2.6.16 release. Does anyone know if it said somewhere in the documentation or any other "official" ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: ntpd and High resolution timer

  1. ntpd and High resolution timer

    Hi everybody,

    I am using NTPd and I have guessed that it uses the High Resolution Timer,
    brought to the linux kernel since the 2.6.16 release.
    Does anyone know if it said somewhere in the documentation or any other
    "official" source, a trusty one.

    thanks

    Maxime

    --
    Maxime Louvel
    0044 7964 5555 80
    43 Allen road
    Whitemore reans
    WV60AW Wolverhampton
    United Kingdom

  2. Re: ntpd and High resolution timer

    >I am using NTPd and I have guessed that it uses the High Resolution Timer,
    >brought to the linux kernel since the 2.6.16 release.
    >Does anyone know if it said somewhere in the documentation or any other
    >"official" source, a trusty one.


    ntpd "just" calls the kernel.

    Recent Linux kernels have several modules for timekeeping.
    Look in .../Documentation/kernel-parameters.txt


    I think the normal one is TSC. (At least on the machines I've
    worked with.) The TSC calibration code is buggy. It doesn't
    quite get the same answer each time. (If you patch the kernel
    to call it several times, you will get several different answers.)

    It's very close, but it's off by enough to confuse ntpd. In
    particular, it will introuduce a startup transient after each
    roboot until ntpd figures out the new drift value. It took my
    system several/many hours to do that.

    I haven't seen that problem since I added
    clocksource=acpi_pm
    on the boot time parameters.

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  3. Re: ntpd and High resolution timer

    hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) writes:

    >>I am using NTPd and I have guessed that it uses the High Resolution Timer,
    >>brought to the linux kernel since the 2.6.16 release.
    >>Does anyone know if it said somewhere in the documentation or any other
    >>"official" source, a trusty one.


    >ntpd "just" calls the kernel.


    >Recent Linux kernels have several modules for timekeeping.
    >Look in .../Documentation/kernel-parameters.txt



    >I think the normal one is TSC. (At least on the machines I've
    >worked with.) The TSC calibration code is buggy. It doesn't
    >quite get the same answer each time. (If you patch the kernel
    >to call it several times, you will get several different answers.)


    >It's very close, but it's off by enough to confuse ntpd. In
    >particular, it will introuduce a startup transient after each
    >roboot until ntpd figures out the new drift value. It took my
    >system several/many hours to do that.


    >I haven't seen that problem since I added
    > clocksource=acpi_pm
    >on the boot time parameters.


    What version of the kernel do you have? 2.6.17 does not have clocksource
    parameter or an acpi_pm option. Is there anywhere where these different
    clock parameters are defined?



  4. Re: ntpd and High resolution timer


    >>I haven't seen that problem since I added
    >> clocksource=acpi_pm
    >>on the boot time parameters.

    >
    >What version of the kernel do you have? 2.6.17 does not have clocksource
    >parameter or an acpi_pm option. Is there anywhere where these different
    >clock parameters are defined?


    I'm using 2.6.23. Documentation/kernel-parameters.txt says:

    clocksource= [GENERIC_TIME] Override the default clocksource
    Format:
    Override the default clocksource and use the clocksource
    with the name specified.
    Some clocksource names to choose from, depending on
    the platform:
    [all] jiffies (this is the base, fallback clocksource)
    [ACPI] acpi_pm
    [ARM] imx_timer1,OSTS,netx_timer,mpu_timer2,
    pxa_timer,timer3,32k_counter,timer0_1
    [AVR32] avr32
    [X86-32] pit,hpet,tsc,vmi-timer;
    scx200_hrt on Geode; cyclone on IBM x440
    [MIPS] MIPS
    [PARISC] cr16
    [S390] tod
    [SH] SuperH
    [SPARC64] tick
    [X86-64] hpet,tsc


    --
    These are my opinions, not necessarily my employer's. I hate spam.


  5. Re: ntpd and High resolution timer

    On Tue, Apr 29, 2008 at 2:36 PM, Hal Murray
    wrote:

    > [X86-32] pit,hpet,tsc,vmi-timer;

    ....
    > [SPARC64] tick
    > [X86-64] hpet,tsc



    Does the HPET support enable microsecond resolution for hardware clock
    reads in Linux (the HPET hardware is supposedly capable of this)?


    --
    RPM

  6. Re: ntpd and High resolution timer

    Ryan Malayter wrote:

    >
    > Does the HPET support enable microsecond resolution for hardware clock
    > reads in Linux (the HPET hardware is supposedly capable of this)?


    Even the CTC allows microsecond resolution. Unless you are Windows, you
    read tbe balance of the countdown value to interpolate between interrupts.


    >
    >


  7. Re: ntpd and High resolution timer


    >Does the HPET support enable microsecond resolution for hardware clock
    >reads in Linux (the HPET hardware is supposedly capable of this)?


    I don't know. A quick test with my kernel seemed to ignore
    that chunk of the command line. I may have it turned off in
    the config file.

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  8. Re: ntpd and High resolution timer

    On Wed, Apr 30, 2008 at 1:27 AM, David Woolley
    wrote:
    > > Does the HPET support enable microsecond resolution for hardware clock
    > > reads in Linux (the HPET hardware is supposedly capable of this)?

    >
    > Even the CTC allows microsecond resolution. Unless you are Windows, you
    > read tbe balance of the countdown value to interpolate between interrupts.


    Ahh... I see. So the only real timing benefit of the HPET is the
    ability to set timer interrupts with microsecond accuracy? That makes
    sense for multimedia, I suppose.

    --
    RPM

  9. Re: ntpd and High resolution timer

    Unruh wrote:

    > What version of the kernel do you have? 2.6.17 does not have clocksource
    > parameter or an acpi_pm option. Is there anywhere where these different
    > clock parameters are defined?


    # cat /sys/devices/system/clocksource/clocksource0/available_clocksource
    tsc acpi_pm pit jiffies

    # cat /sys/devices/system/clocksource/clocksource0/current_clocksource
    tsc

+ Reply to Thread