[Techtalk] Weird kernel msgs

Dafydd Harries daf at muse.19inch.net
Sun Apr 4 04:49:40 EST 2004


Ar 04/04/2004 am 06:37, ysgrifennodd Ricky Buchanan:
> I have seen this tossed onto /dev/console a few times lately, maybe four
> times in the 2 weeks since I switched to kernel 2.6.3:
> 
> Losing too many ticks!
> TSC cannot be used as a timesource.  <4>Possible reasons for this are:
>   You're running with Speedstep,
>   You don't have DMA enabled for your hard disk (see hdparm),
>   Incorrect TSC synchronization on an SMP system (see dmesg).
> Falling back to a sane timesource now.
> 
> Anybody know what it means?

This is my understanding:

The TSC (I forget what it stands for - Time Stamp Counter?) is a
hardware device the kernel uses to keep track of what the time is. I
think they're also referred to as 8254s, and are considered rather out
of date due to problems they have with variable-speed processors,
multi-processor machines, etc.

For some reason or other, the kernel is noticing problems with the TSC -
it's losing time. However, there are other devices that can be used
instead of the TSC, such as a HPET (Hight Precision Something Timer?)
or a Power Management Timer (found on ACPI-capable machines, which I
gather is most machines manufactured during the past couple of years)
and the kernel is using one of these instead. Support for HPETs and PMTs
have to be compiled into the kernel if you want it to try and use them.

The problem with the TSC could be:

 - You're using a processor with a variable clock rate - these are
   especially common on laptops.
 - You don't have DMA enabled for a hard disk. The hdparm tool can be
   used to turn DMA on, and doing so highly desirable since it can
   dramatically improve performance. I think that DMA is turned on
   automatically under certain circumstances.
 - You are using a multi-processor machine, which TSCs aren't very good
   at dealing with.

In summary: I don't think it's anything to worry about, but you might
want to check that support for HPETs and PMTs are enabled in your kernel
(CONFIG_HPET_TIMER and CONFIG_X86_PM_TIMER in .config, I think). Also,
it might be worth checking whether DMA is enabled for your disks. For
example, you can do this for /dev/hda by looking for the "using_dma"
line in /proc/ide/hda/settings.

-- 
Dafydd


More information about the Techtalk mailing list