linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 219640] New: Preferred cores working incorrectly for Zen3 CPU (regression)
@ 2024-12-30  9:16 bugzilla-daemon
  2024-12-30  9:20 ` [Bug 219640] " bugzilla-daemon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-daemon @ 2024-12-30  9:16 UTC (permalink / raw)
  To: linux-pm

https://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: linux-pm@vger.kernel.org
          Reporter: sobrus@gmail.com
        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 <mario.limonciello@amd.com>
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.

    Suggested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Fixes: ad4caad58d91 ("cpufreq: amd-pstate: Merge
amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()")
    Link:
https://lore.kernel.org/r/20241209185248.16301-2-mario.limonciello@amd.com
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

 Documentation/admin-guide/pm/amd-pstate.rst |  4 +---
 drivers/cpufreq/amd-pstate.c                | 25 +++++++++++++++----------
 2 files changed, 16 insertions(+), 13 deletions(-)

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 219640] Preferred cores working incorrectly for Zen3 CPU (regression)
  2024-12-30  9:16 [Bug 219640] New: Preferred cores working incorrectly for Zen3 CPU (regression) bugzilla-daemon
@ 2024-12-30  9:20 ` bugzilla-daemon
  2024-12-30 11:53 ` [Bug 219640] [REGRESSION, BISECTED] " bugzilla-daemon
  2025-01-02  2:11 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2024-12-30  9:20 UTC (permalink / raw)
  To: linux-pm

https://bugzilla.kernel.org/show_bug.cgi?id=219640

Sebastian (sobrus@gmail.com) 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                          |Yes

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 219640] [REGRESSION, BISECTED] Preferred cores working incorrectly for Zen3 CPU (regression)
  2024-12-30  9:16 [Bug 219640] New: Preferred cores working incorrectly for Zen3 CPU (regression) bugzilla-daemon
  2024-12-30  9:20 ` [Bug 219640] " bugzilla-daemon
@ 2024-12-30 11:53 ` bugzilla-daemon
  2025-01-02  2:11 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2024-12-30 11:53 UTC (permalink / raw)
  To: linux-pm

https://bugzilla.kernel.org/show_bug.cgi?id=219640

Artem S. Tashkinov (aros@gmx.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Preferred cores working     |[REGRESSION, BISECTED]
                   |incorrectly for Zen3 CPU    |Preferred cores working
                   |(regression)                |incorrectly for Zen3 CPU
                   |                            |(regression)

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 219640] [REGRESSION, BISECTED] Preferred cores working incorrectly for Zen3 CPU (regression)
  2024-12-30  9:16 [Bug 219640] New: Preferred cores working incorrectly for Zen3 CPU (regression) bugzilla-daemon
  2024-12-30  9:20 ` [Bug 219640] " bugzilla-daemon
  2024-12-30 11:53 ` [Bug 219640] [REGRESSION, BISECTED] " bugzilla-daemon
@ 2025-01-02  2:11 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2025-01-02  2:11 UTC (permalink / raw)
  To: linux-pm

https://bugzilla.kernel.org/show_bug.cgi?id=219640

Mario Limonciello (AMD) (mario.limonciello@amd.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|linux-pm@vger.kernel.org    |mario.limonciello@amd.com

--- Comment #1 from Mario Limonciello (AMD) (mario.limonciello@amd.com) ---
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/20241223043407.1611-1-kprateek.nayak@amd.com/#t

If not aware you can use the tool 'b4' to download and apply that series:

```
b4 shazam
https://lore.kernel.org/lkml/20241223043407.1611-1-kprateek.nayak@amd.com/#t
```

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-02  2:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-30  9:16 [Bug 219640] New: Preferred cores working incorrectly for Zen3 CPU (regression) bugzilla-daemon
2024-12-30  9:20 ` [Bug 219640] " bugzilla-daemon
2024-12-30 11:53 ` [Bug 219640] [REGRESSION, BISECTED] " bugzilla-daemon
2025-01-02  2:11 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).