New: Preferred cores working incorrectly for Zen3 CPU (regression)
[email protected]
Reviewed-by Gautham R. Shenoyhttps://bugzilla.kernel.org/show_bug.cgi?id=219640
Bug ID: 219640
Summary: Preferred cores working incorrectly for Zen3 CPU
(regression)
Product: Power Management
Version: 2.5
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: cpufreq
Assignee: [email protected]
Reporter: [email protected]
Regression: No
Created attachment 307415
--> https://bugzilla.kernel.org/attachment.cgi?id=307415&action=edit
Outputs comparing affected and unaffected kernels
Hi Kernel Team,
I've noticed a preferred cores regression while using most recent CachyOS kernels on Zen3 platform with amd_pstate_epp driver (5950x, amd_pstate=active). Regression is clearly visible in ryzen_monitor when running low thread workloads - instead of sticking to best cores, it chooses the cores randomly (?) for each subsequent workload run.
CachyOS team developer has bissected the issue to commit 39311a230e04eab2fe7e257ad79922040bfdaf1c
Original CachyOS forum thread:
https://discuss.cachyos.org/t/preferred-cores-stopped-working-for-zen3-cpu/5108/6
Steps to reproduce:
- use ryzen_monitor or some kind of system monitor to see which cores are being utilized
- run “stress - c 2” or other software causing low-thread workload.
- observe core utilization, frequency and consumed power
Below I'm attaching detailed commit info, output of cpupower frequency-info, output of amd-pstate-triage.py and output of ryzen_monitor while running "stress -c 4" for both affected and unaffected kernels.
The differences I've noticed are:
- affected kernel has ITMT: Y instead of 1
- affected kernel highest performance reported by cpupower frequency-info is 166 instead of 196.
Hardware is Ryzen 5950x, undervolted using per-core PBO and voltage offset, limited to 4750Mhz and 80C, AGESA 1.2.0.7, chipset B550.
Commit info:
commit 39311a230e04eab2fe7e257ad79922040bfdaf1c
Author: Mario Limonciello <[email protected]> Date: Mon Dec 9 12:52:34 2024 -0600
cpufreq/amd-pstate: Store the boost numerator as highest perf again
commit ad4caad58d91d ("cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()") changed the semantics for highest perf and commit 18d9b52271213 ("cpufreq/amd-pstate: Use nominal perf for limits when boost is disabled") worked around those semantic changes.
This however is a confusing result and furthermore makes it awkward to change frequency limits and boost due to the scaling differences. Restore the boost numerator to highest perf again.
amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()")
Link:
https://lore.kernel.org/r/[email protected]
Documentation/admin-guide/pm/amd-pstate.rst | 4 +--- drivers/cpufreq/amd-pstate.c | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-)
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 219640] Preferred cores working incorrectly for Zen3 CPU (regression)
https://bugzilla.kernel.org/show_bug.cgi?id=219640
Sebastian ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Bisected commit-id| |39311a230e04eab2fe7e257ad79
| |922040bfdaf1c
URL| |https://discuss.cachyos.org
| |/t/preferred-cores-stopped-
| |working-for-zen3-cpu/5108/6
Kernel Version| |6.13rc4
Regression|No |YesSignature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 219640] [REGRESSION, BISECTED] Preferred cores working incorrectly for Zen3 CPU (regression)
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=219640
Artem S. Tashkinov ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Preferred cores working |[REGRESSION, BISECTED]
|incorrectly for Zen3 CPU |Preferred cores working
|(regression) |incorrectly for Zen3 CPU
| |(regression)Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 219640] [REGRESSION, BISECTED] Preferred cores working incorrectly for Zen3 CPU (regression)
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=219640
Mario Limonciello (AMD) ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|[email protected] |[email protected]--- Comment #1 from Mario Limonciello (AMD) ([email protected]) --- Created attachment 307438
--> https://bugzilla.kernel.org/attachment.cgi?id=307438&action=edit
potential patch (v1)
FWIW that commit ID is a little bit different than what landed in mainline. This is the mainline commit ID:
https://git.kernel.org/torvalds/c/50a062a762005
Looking at the changes in what you identified, I have a patch that might help. Can you please have a try with it?
If that doesn't work to help isolate; can you please tell me if you can also reproduce this issue using the 'linux-next' branch here:
https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git/log/?h=linux-next
While also adding this patch series on top of it?
https://lore.kernel.org/lkml/[email protected]/#t
If not aware you can use the tool 'b4' to download and apply that series:
``` b4 shazam https://lore.kernel.org/lkml/[email protected]/#t ```
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.