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

RE: TSC cannot be used as a time source?

An excellent explanation, I never knew that is how it worked.

-----Original Message-----
From: fedora-list-bounces redhat com
[mailto:fedora-list-bounces redhat com]On Behalf Of John DeDourek
Sent: Friday, October 15, 2004 8:48 PM
To: Linn Kubler; For users of Fedora Core releases
Subject: Re: TSC cannot be used as a time source?

Linn Kubler wrote:

>Frist time posting here, if this is the wrong list for this type of
>question please forgive me.
>When I boot my server I get this message after logging in:
>TSC cannot be used as a timesource.
>Possible reasons for this are:
>  You're running Speedstep,
>  You don't have DMA enabled for you're hard disk (see hdparm),
>  Incorrect TSC synchronization on an SMP system (see dmesg).
>Falling back to a sane timesource now.
>Can someone explain what's happening here and how to correct it?  When
>I installed the server I used the same timesource I use on other
>non-Linux systems.
>BTW, this is an installation on VPC.
>Thanks in advance,

I believe that I understand the meaning of the message, but 
unfortunately don't know
enough about your system to suggest a fix.  Perhaps though if I explain 
the message
it will help you tracking down the problem.

Time keeping in Linux is done by an interrupt which occurs regularly 
on most systems to happen every 10ms, that's 0.01 sec).  This means that 
0.01 second the time stored in the operating system is incremented by 
0.01 second.
If you were to create a time stamped log, the times would be like: 25.03 
or 25.04 seconds, but never 25.035 second.

Some applications need a higher resolution.  They want times like 
25.036928 seconds.
Modern Intel Pentium chips have a counter that just counts up by one at 
a high
speed.  But it just starts at zero when you boot and goes from there, so 
it doesn't
really specify the time.  Someone came up with the idea that the system 
check how much gets added to the counter between two of the regular clock
interrupts, that is in 0.01 second.  As the system runs, Linux records 
the value
of the counter at each of the interrupts. Then when you need a highly 
accurate time,
Linux looks at the counter and uses this as an estimate of how far you 
are between
interrupts.  (Technically it does a linear interpolation; look at a math 
reference for

This idea works ONLY if the counter goes up about the same amount between
each interrupt, that is in each  0.01 second.  If it doesn't, obviously 
this scheme
won't work.  If you look at your error message, linux is saying just 
that.  The
counter (named: TSC) is not giving the same result for each 0.01 second 
Therefore, linux has decided to cease trying to use the TSC.  Result, 
you will get
times that have a resolution of 0.01 second.

If such times are satisfactory, just ignore the message; you don't need 
the TSC.

If you DO NEED more precision in your times, then you will need to research
why linux is finding that the TSC counter is not consistent.  The error 
gives the first things to check.  For example, "speedstep".  This is a 
that makes the processor (and therefore the TSC) run faster and slower.
Faster means programs get done quicker, but it also means CPU runs 
hotter and
bettery (in a laptop) runs down faster. And vice versa for slower.  So if
you are running in speedstep mode, turn it off.  How do you know? How do
you turn it off?  Unfortunately, this is where my expertise ends and you'll
need to search further.

Good luck.

fedora-list mailing list
fedora-list redhat com
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list

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