[ntp:questions] no ntp synchronisation: 2s to 6s time shift !

Martin Burnicki martin.burnicki at meinberg.de
Wed Feb 13 15:25:14 UTC 2008

Unruh wrote:
> Any place where these different clock models is described?

Hm, I think "clock models" in the sense of NTP is not correct in this
context. AFAIK there is only one "clock model" in the Linux kernel which
uses one of those "clocksource" modules as its base for timekeeping,
similar to the way ntpd uses a refclock as time source.

Each of the clocksource modules deals with a dedicated timer or counter
which may or may not be available on a specific hardware architecture, i.e.
the x86_64 hardware may provide different timers in its chipset than the
i386 architecture.

> And defined (what is tsc?)

The only place I've found to get an overview is the file
Documentation/kernel-parameters.txt which is part of the Linux kernel
sources. This also lists which clocksource modules may be available for
which hardware architecture.

Here's the relevant part from a 2.6.22 kernel:

  clocksource=  [GENERIC_TIME] Override the default clocksource
      Format: <string>
      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,
      [AVR32] avr32
      [IA-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

As already mentioned by David Woolley the TSC counter is a register inside
Pentium CPUs or higher. The tick rate corresponds to the CPU clock, so if
the CPU clock changes due to power saving efforts this has to be taken into
account when measuring time intervals.

The acpi_pm module uses the ACPI Power Management timer which is available
on every PC which supports ACPI services. 

The hpet module uses the High Precision Event Timers indroduced by recent
Intel chip sets. AFAIK it's a replacement for the old Periodic Interrupt
Timer from the original IBM PC architecture which used to generate periodic
interrupts at 18.2 Hz under DOS.

I don't know the exact details or advantages/disadvantages of those timers.
However, from several postings here in the NG and elsewhere I've seen that
certain modules may not work properly on certain chipsets. This must not
necessarily be due to the modules, AFAIK there are also chipsets out there
where the timers don't work properly and would require specific

Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list