Alpha clock sometimes slow, sometimes fast.
Tested platform is UP2000, Redhat 6.2, 2.2.14-6.0 and 2.3.99-pre3, 
both kernels are configured to support SMP.
Analysis of kernel source is.
1. Alpha kernel code increase/adjust time value based on rpcc value.
2. Accurate clock speed(cycle frequency) is very important to caculate rpcc
value.
3. kernel code gets cycle frequency from hwrpb->cycle_freq but if there's
more than 1%
        difference btw. the value and measured one then kernel uses
measured one.

And the cycle frequency value caused the problem when it's not accurate.
By over/under estimating the cycle frequency, time goes fast or slow.
Here's an example.
CPU clock is 700MHz but /proc/cpuinfo reports

cycle frequency [Hz]    : 699300699 
platform string         : API UP1000 699 MHz

the freq. must be 700000000 so diff. btw those two are
700000000 - 699300699 = 699301
approx. 700000 error per sec. it's
700000/700000000 = 0.001sec error/sec
0.001 * 24 * 60 * 60 = 86.400 sec errir/day.

1MHz error makes 1:30 sec error.
Following is UP2000 with 600Mhz CPU
As you can guess It'll get approx. 3min error per day.

cycle frequency [Hz]    : 598802395 
platform string         : AlphaPC 264DP 598 MHz

Kernel tries to detect the frequency because the info from SRM is not
correct sometimes.
(comment in the source file said so), But we can guess the measured value
was also inaccurate.
I think we cannot measure the frequency accurately always. 
So what about rounding off the frequency count?

Soohoon.

Reply via email to