Next Previous Contents

2. What are BogoMips

>From Lars Wirzenius' wirzeniu@kruuna.Helsinki.FI mail of 9 September 1993, explaining Bogomips, with additional detailed information by Alessandro Rubini, rubini@norgana.systemy.it, 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 bootup 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), 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 \;


Next Previous Contents