Re: problem in BOGOmips

Richard B. Johnson (root@chaos.analogic.com)
Fri, 9 Feb 2001 16:29:25 -0500 (EST)


On Sat, 10 Feb 2001, Ashish Gupta wrote:

> Hi,
> I want to use bogomips as the indicator of CPU capability for
> different architectures. I have found following values from /proc/cpuinfo
> for different CPUs.
>

In a nutshell, you can't!

There is the requirement for some small delays when performing
certain kernel functions. Therefore, upon startup, a delay
loop is calibrated by checking how many times the delay-loop
gets executed between two or more hardware interrupts. The
hardware interrupts occur at quite precise intervals so the
calibration can be quite accurate.

A side-effect of the calibration is a loop-count variable.
I should have been called "Loop count", but instead, it
was called "bogomips". Many persons assume that "bogomips"
has some relationship to CPU speed or machine capability.
It doesn't. It can only be claimed that a CPU with a faster
core clock might result in a larger loop-count. In fact
a CPU with a faster core-clock might even show a lesser
loop-count because of differences in internal cache management
or branch-prediction with different CPUs.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/