PDA

View Full Version : real cpu speed: /proc/cpuinfo incoherent with /sys/device/system/cpu/cpu?/cpufreq


Marcuccio
3rd January 2011, 08:08 PM
Hi all,
my cpu is a core i7 920 which has 4 cores and hyperthreading feature, the chipset is an x58 on an asus p6t MB. I'm running Fedora 13 with the latest kernel (2.6.34.7-66.fc13.x86_64 ) and cpuspeed daemon is enabled.

the kernel see 8 cpus becouse of the hyperthreading feature

In /proc/cpuinfo i see 8 cpus and i can see cpu scaling with the ondemand governor varying the frequency of any single cpu. The first strange things is that I expect to see frequency variation always on a pair of cpu because real core are only 4 and hyperthreaded cpu within the same core have the same clock. In /proc/cpuinfo i see the cpus changing frequency indipendently as they were 8 phisical and separated core.

To further investigate this I looked in /sys/devices/system/cpu/cpu?/cpufreq/cpuinfo_cur_freq and I discovered that all the cpus always have the same frequency. cpuspeed is varying the frequency based on the load but all cpu are affected simultaneously.

So my first question is: who is telling the truth ? /proc/cpuinfo or /sys/device/system/cpu... ?

My second question is what is cpuspeed really doing ?

Any ideas ?

Marco

Marcuccio
25th April 2011, 07:03 PM
I answer to myself: my Intel core i7 920 is unable to variate the speed of a single core, it can variate the speed aof the cores all toghether. So information in /proc/cpuinfo are what the kernel would like to do, but the real speed of the cpu is in /sys/devices/system/cpu/cpu?/cpufreq/cpuinfo_cur_freq

cpuspeed is useless if you have a kernel governor module available...the cpuspeed startup script check this for you and enable the right module or the cpuspeed daemon.

Marco