Re: [BUG] wrong bogomips values with kernel 2.6.16

Knut Petersen
2006-03-22T17:44:39Z

Linus Torvalds wrote:

>On Wed, 22 Mar 2006, Knut Petersen wrote:
>
>
>>All Pentium M, Xeon up to model 2 and the P6 family increment with every
>>internal processor cycle.
>>
>>
>
>Just to humor me. Try the bogomips loop in user space with something like
>the appended (make sure the frequency is fixed to the lowest frequency).
>
> Linus
>
>
No problem ...

linux:~ # cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1867000 1600000 1333000 1067000 800000

linux:~ # echo 800000 >
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed;cat
/proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 800.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 3730.27

TSC: 798.307872 MHz

linux:~ # echo 1067000 >
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed;cat
/proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 1067.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 4975.25

TSC: 1064.407897 MHz

linux:~ # echo 1333000 >
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed;cat
/proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 1333.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 6215.57

TSC: 1330.511688 MHz

linux:~ # echo 1600000 >
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed;cat
/proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 1600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 7460.55

TSC: 1596.612533 MHz

linux:~ # echo 1867000 >
/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed;cat
/proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 1867.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 8705.53

TSC: 1862.715048 MHz

I tried kernel _2.6.15_ too - it´s even more broken:

linux:~ # cat /proc/cpuinfo;./test
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.86GHz
stepping : 8
cpu MHz : 4347.853
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tmpbe nx est tm2
bogomips : 8702.35

TSC: 1863.086854 MHz

Isn´t that nice? I´m able to overclock my 1.86 MHz cpu to stable 4.35 MHz
with just a passive heatsink ;-)))

cu,
Knut