Bug 51681 - /proc/cpuinfo doesn't support showing the correct Turbo Core frequency
Summary: /proc/cpuinfo doesn't support showing the correct Turbo Core frequency
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_other
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-13 08:43 UTC by sworddragon2
Modified: 2020-08-31 06:45 UTC (History)
8 users (show)

See Also:
Kernel Version: 3.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Log of /proc/cpuinfo and top (9.94 KB, text/x-log)
2012-12-13 08:43 UTC, sworddragon2
Details

Description sworddragon2 2012-12-13 08:43:09 UTC
My AMD Phenom II X6 1045T has a normal maximum frequenzy of 2.7 GHz but can boost up to 3 cores to 3.2 GHz if needed. My BIOS is showing correctly 3.2 GHz as the maximum frequenzy. Here are some informations about my system:

sworddragon@ubuntu:~$ uname -m
x86_64
sworddragon@ubuntu:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2700000 2000000 1400000 800000 

I have written a script which uses 100% of cpu time for 1 core. Theoretically this should force the processor to go up to 3.2 GHz on this core. In the attachments is a log which shows the output from /proc/cpuinfo and top which shows that my processor is still using just 2.7 GHz.
Comment 1 sworddragon2 2012-12-13 08:43:52 UTC
Created attachment 89081 [details]
Log of /proc/cpuinfo and top
Comment 2 Francesco Muzio 2013-01-04 18:53:16 UTC
I have two different AMD CPUs with turbo core feature enabled: a Phenom II X6 1055T and a dualcore C-70

both have the same behaviour: if I read the frequency value from /sys/devices/system/cpu/*/cpufreq/* or /proc/cpuinfo I see the cores to never reach the "turbo" frequency. 
But the software cpufreq-aperf (found in the cpufrequtils package on a Debian system) can show me these peaks, expecially if I force 5 cores to powersave and 1 on performance governor

for use cpuafreq-aper must be load the msr kernel module, I think the Turbo frequency is an internal feature of a CPU, difficult to control and monitor
Comment 3 sworddragon2 2013-11-20 15:04:42 UTC
Thanks for the hint of cpufreq-aperf. Here are the results:

root@ubuntu:~# taskset -c 0 sh -c "./test.py & sleep 1 && cpufreq-aperf --once && echo ---------- && cat /proc/cpuinfo | grep MHz && pkill ^test.py$"
CPU Average freq(KHz) Time in C0 Time in Cx C0 percentage
000 3186000 01 sec 005 ms 6832127434 sec 705 ms 100
001 0783000 00 sec 026 ms 00 sec 976 ms 02
002 0783000 00 sec 032 ms 00 sec 970 ms 03
003 0783000 00 sec 001 ms 01 sec 001 ms 00
004 0783000 00 sec 016 ms 00 sec 986 ms 01
005 0783000 00 sec 039 ms 00 sec 963 ms 03
----------
cpu MHz : 2700.000
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 800.000


Turbo Core is working but /proc/cpuinfo doesn't support showing the correct frequency.
Comment 4 David Garabana Barro 2020-05-15 12:27:01 UTC
It's working on 4.19.0-9-amd64 Debian 10 kernel directly from /proc/cpuinfo:

# cat /proc/cpuinfo |grep -i model
model           : 10
model name      : AMD Phenom(tm) II X6 1090T Processor

# cat /proc/cpuinfo |grep MHz
cpu MHz         : 3528.820
cpu MHz         : 831.966
cpu MHz         : 893.121
cpu MHz         : 800.173
cpu MHz         : 1354.755
cpu MHz         : 979.302
# cat /proc/cpuinfo |grep MHz
cpu MHz         : 3505.403
cpu MHz         : 834.381
cpu MHz         : 1281.693
cpu MHz         : 1555.635
cpu MHz         : 1476.154
cpu MHz         : 955.208

3600 MHz turbo core.

I think this bug can be closed as resolved.

Note You need to log in before you can comment on or make changes to this bug.