Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229155 - /proc/cpuinfo shows wrong MHz value on 2.6.25
Summary: /proc/cpuinfo shows wrong MHz value on 2.6.25
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 01:20 UTC by Simon Perry
Modified: 2008-06-29 16:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Config for 2.6.25 hardened (config-2.6.25-hardened,34.06 KB, text/plain)
2008-06-24 01:26 UTC, Simon Perry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Perry 2008-06-24 01:20:55 UTC
After cleanly building hardened 2.6.25, /proc/cpuinfo is reporting an incorrect value for the CPU speed when using the ondemand governor.

Reproducible: Always

Steps to Reproduce:
1. Install hardened sources 2.6.25
2. Build kernel (will attach .config)
3. cat /proc/cpuinfio

Actual Results:

$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping	: 2
cpu MHz		: 3450.000
cache size	: 256 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 mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pebs bts
bogomips	: 3437.14
clflush size	: 64

Expected Results:

Should be something like 425Mhz when there's no load on the box.

e.g. cpu MHz	: 425.000

Cheers.
Comment 1 Simon Perry 2008-06-24 01:21:55 UTC
More info:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 
3450000

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 
3450000

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
13800000

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 
ondemand
Comment 2 Simon Perry 2008-06-24 01:26:14 UTC
Created attachment 158171 [details]
Config for 2.6.25 hardened

Attached config.
Comment 3 solar (RETIRED) gentoo-dev 2008-06-24 02:26:50 UTC
Please test with vanilla and confirm if problem still exists. If it does not then please reopen bug and leave assigned to hardened. If it does then reopen and assign to kernel@

I can't see this being limited to hardened or a user error in any such way as any patch we add should have 0 to do with such areas of code in the kernel.
Comment 4 Simon Perry 2008-06-24 03:12:00 UTC
I have another box using ~x86 on an AMD, it is running gentoo-sources 2.6.25-r5 with the ondemand governor and it reports correctly:

$ uname -a
Linux starbuck 2.6.25-gentoo-r5 #1 Mon Jun 23 18:10:51 EST 2008 i686 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD GNU/Linux

$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 39
model name	: AMD Athlon(tm) 64 Processor 3700+
stepping	: 1
cpu MHz		: 1000.000
cache size	: 1024 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm ts fid vid ttp tm stc
bogomips	: 2059.20
clflush size	: 64

Will build vanilla on the Intel box if that is your suggestion.
Comment 5 Simon Perry 2008-06-24 03:17:56 UTC
Latest vanilla for ~x86 is:

vanilla-sources-2.6.26_rc7

Is this what you want me to build?
Comment 6 Simon Perry 2008-06-24 03:28:39 UTC
Ignore last comment, building a stock 2.6.25 from the tarball in my distfiles directory.
Comment 7 Simon Perry 2008-06-24 03:44:56 UTC
Confirmed, vanilla 2.6.25 shows same dodgy info:

$ uname -a
Linux nexus 2.6.25 #1 Tue Jun 24 13:35:56 EST 2008 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz GenuineIntel GNU/Linux

[pezz@nexus]-[13:41:53]-[~]
$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 1
model name	: Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping	: 2
cpu MHz		: 3450.000
cache size	: 256 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 pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pebs bts
bogomips	: 3436.77
clflush size	: 64
Comment 8 solar (RETIRED) gentoo-dev 2008-06-24 04:40:59 UTC
Ok so confirmed.. This has is not related to hardened and thus this bug is 
mis-assigned. Reassign to kernel.
Comment 9 Simon Perry 2008-06-24 06:46:12 UTC
Looks like the p4-clockmod driver wasn't helping me power consumption like I thought it was:

http://www.gossamer-threads.com/lists/linux/kernel/927570

I think I should just forget this and get a newer CPU...  :)

Feel free to close unless you feel the issue is worth addressing.

Cheers.
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2008-06-29 16:05:26 UTC
Heh, interesting. If you're interested in following up, you should file a bug at http://bugzilla.kernel.org, and feel free to let us know if patches become available.