Bug 195275 - Max CPU frequency incorrect for AMD Ryzen 1700
Summary: Max CPU frequency incorrect for AMD Ryzen 1700
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: Other Linux
: P1 high
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-07 02:06 UTC by Jason Grunhut
Modified: 2019-07-17 08:46 UTC (History)
2 users (show)

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


Attachments

Description Jason Grunhut 2017-04-07 02:06:00 UTC
The maximum frequency that is stated for the newly released AMD Ryzen 7 1700 is 3000 MHz (3 GHz) according to lscpu, /proc/cpuinfo, dmidecode, lshw. According to AMD, and all information that I've read on the internet, this CPU should be capable of boosting its speed to 3.7 GHz. The motherboard is an MSI Tomahawk B350, if for any reason this is related to a motherboard issue (with the most recent updated BIOS as of April 6, 2017).

I'm not sure if this is governed by the OS or the CPU directly (and if this information passed on to the OS) so I thought I would submit this as a possible bug. My only other point of comparison is an Intel i7-6500U run on my laptop, which correctly provides the maximum CPU frequency of 3.1 GHz (or base of 2.5 GHz).

Results of lscpu:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            23
Model:                 1
Model name:            AMD Ryzen 7 1700 Eight-Core Processor
Stepping:              1
CPU MHz:               1550.000
CPU max MHz:           3000.0000
CPU min MHz:           1550.0000
BogoMIPS:              5988.87
Virtualization:        AMD-V
L1d cache:             32K
L1i cache:             64K
L2 cache:              512K
L3 cache:              8192K
NUMA node0 CPU(s):     0-15
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_l2 mwaitx hw_pstate vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic overflow_recov succor smca

Please let me know if I can provide any more information.
Comment 1 Ferdia McKeogh 2017-09-16 18:20:26 UTC
I believe CPU frequency is determined in /arch/x86/kernel/cpu/amd.c. I'll have my Risen system up and running tomorrow, and I'll be able to work on this issue then.
Comment 2 Ferdia McKeogh 2017-09-16 18:24:46 UTC
I apologise, please ignore my previous comment. They are correctly reporting the Ryzen 1700's base frequency. Your boost frequency on single threaded workloads will be the correct 3.7GHz, but only the base is reported.
Comment 3 vasthusya 2019-01-14 07:49:31 UTC
I'm not sure if I should necro this ticket or start a new one.

I have Ryzen 5 2500u with the same issue that it is capped at 2 GHz on coldboot.
However, after it is rebooted (from Linux) and wait around 10 seconds in the boot menu, the clock speed can surpass the cap up to 3.6 GHz.

The following were taken whilst running cryptsetup benchmark:

$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       43 bits physical, 48 bits virtual
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           AuthenticAMD
CPU family:          23
Model:               17
Model name:          AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
Stepping:            0
CPU MHz:             2544.721
CPU max MHz:         2000.0000
CPU min MHz:         1600.0000
BogoMIPS:            3994.09
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           64K
L2 cache:            512K
L3 cache:            4096K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca

$ cpupower -c 0 frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1.60 GHz - 2.00 GHz
  available frequency steps:  2.00 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: performance schedutil
  current policy: frequency should be within 1.60 GHz and 2.00 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.54 GHz (asserted by call to kernel)
  boost state support:
    Supported: no
    Active: no

See AMD thread:
https://community.amd.com/thread/229980#2893988

I have uploaded a set of kernel messages for another ticket #201921:
Kernel messages from various boot states. (99.27 KB, application/zip)
https://bugzilla.kernel.org/attachment.cgi?id=280459
Comment 4 vasthusya 2019-07-17 08:46:11 UTC
I just found the processor boosting control in sysfs.

https://www.kernel.org/doc/Documentation/cpu-freq/boost.txt

This issue can be remedied by re-enabling boost.

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