[ntp:questions] Re: linux system clock egregiously slow!

Hal Murray hmurray at suespammers.org
Wed Jan 21 20:14:00 UTC 2004


>0.  turn off interrupts
>1.  make sure the MIPS real-time clock is running
>2.  store the 32-bit number "270,000,000" (ten seconds) into countdown
>    timer #5 
>3.  store zero into the program cycle counter
>4.  loop while timer #5 > 270,000,000 minus 2,700,000 (.1 seconds)
>5.  read back the program cycle counter: that is the number of cycles
>    in .1 seconds
>
>mips_counter_frequency = (number of cycles in .1 seconds) * 10

That looks like a resonable recipe to me, but that doesn't mean
it works as expected.  What rate is timer #5 running at?  Is there
some roundoff in setting it up?

Print out the value and see if it makes sense.

There have been round off errors when HZ was a strange value.
I forget the details.

-- 
The suespammers.org mail server is located in California.  So are all my
other mailboxes.  Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's.  I hate spam.




More information about the questions mailing list