http://www.wlug.org.nz/HowToBogoMips

2. The frequently asked questions about BogoMips

Several authors have contributed to my knowledge of BogoMips. In this place, I would 
like to thank them highly.
2.1 What are BogoMips

Quoted from the Internet, origin unknown but brought to the attention by Eric S 
Raymond [EMAIL PROTECTED], and Geoff Mackenzie [EMAIL PROTECTED], there is an 
humourously illustrative definition of BogoMips as ''the number of million times per 
second a processor can do absolutely nothing.''

On a more precise basis, from Lars Wirzenius' [EMAIL PROTECTED] mail of 9 September 
1993, explaining Bogomips, with additional detailed information by Alessandro Rubini, 
[EMAIL PROTECTED], and by Wim van Dorst:

`MIPS is short for Millions of Instructions Per Second. It is a measure for the 
computation speed of a program. Like most such measures, it is more often abused than 
used properly (it is very difficult to justly compare MIPS for different kinds of 
computers).

BogoMips are Linus's invention. The kernel (or was it a device driver?) needs a timing 
loop (the time is too short and/or needs to be too exact for a non-busy-loop method of 
waiting), which must be calibrated to the processor speed of the machine. Hence, the 
kernel measures at boot time how fast a certain kind of busy loop runs on a computer. 
"Bogo" comes from "bogus", i.e, something which is a fake. Hence, the BogoMips value 
gives some indication of the processor speed, but it is way too unscientific to be 
called anything but BogoMips.

The reasons (there are two) it is printed during boot-up is that a) it is slightly 
useful for debugging and for checking that the computers caches and turbo button work, 
and b) Linus loves to chuckle when he sees confused people on the news.'

BogoMips are being determined in /usr/src/linux/init/main.c (simple C algorithm, with 
a nice example of floating point arithmetic within the fully integer kernel), and the 
pertaining kernel variable loops_per_sec is used in several drivers for more serious 
purpose. The actual delay function udelay() is in assembler, and therefore each port 
has its own definition in /include/asm/delay.h. The loops_per_sec variable and the 
udelay() function are used in numerous drivers, see:

cd /usr/src/linux #or where else source is located find . -name '*.[hcS]' -exec fgrep 
loops_per_sec {} /dev/null \; find . -name '*.[hcS]' -exec fgrep udelay {} /dev/null \;

The BogoMips calculation loop for the non Intel CPUs is similar but not the same, 
because it is programmed in another assembler language. BogoMips is however the only 
portable way over the various CPUs (Intel-type and non Intel-type) for getting an 
indication of the CPU speed. Even CPU clock speed is not available on all CPUs. 



_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

Reply via email to