Re: How does Linux measure CPU frequency?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: dean gaudet <dean@...>
Cc: <linux-kernel@...>
Date: Monday, April 7, 2008 - 9:16 am

On Sun, Apr 6, 2008 at 5:37 PM, dean gaudet <dean@arctic.org> wrote:

 The MHZ measures time by gettimeofday( ), and
 this assumes that the function gettimeofday( ) returns the actual
 real-world time elapse in microseconds, instead of some scaled time.
 What I mean here by scaled time is, Linux kernel keeps time by reading
 a counter which is increased by one when an interrupt is generated
 from a physical timer, and Linux defines the default HZ = 100 which
 means an interrupt is generated every 10 milliseconds, but without
 knowing which clock the physical timer is clocked at it is impossible
 to correctly measure 10 milliseconds by the timer. Therefore, the
 results from MHZ could be scaled? please correct me if I am wrong.

And, I believe this is the same case for Linux TSC (time stamp
counter), as the time constant of ~50ms is also measured by a
programmable interval timer which can also be scaled.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
How does Linux measure CPU frequency?, Jack Harvard, (Sun Apr 6, 12:30 pm)
Re: How does Linux measure CPU frequency?, dean gaudet, (Sun Apr 6, 12:37 pm)
Re: How does Linux measure CPU frequency?, Jack Harvard, (Mon Apr 7, 9:16 am)