>From Lars Wirzenius,' wirzeniu@kruuna.Helsinki.FI
mail
of 9 September 1993, explaining Bogomips, with additional
detailed information 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 various drivers of the net, scsi,
and char sections. The actual delay functions are in assembler,
and therefore each port has their own in /include/asm/delay.h
.
This loops_per_sec
variable is used in various drivers for
char, net, and scsi devices, see:
find /usr/src/linux -name '*.[hcS]' -print -exec fgrep loops_per_sec {} \;