From: bugzilla-daemon@kernel.org
To: linux-pm@vger.kernel.org
Subject: [Bug 219431] [6.12] amd-pstate / Ryzen 5xxx (Zen 3, Vermeer): Could not retrieve highest performance (-19)
Date: Mon, 28 Oct 2024 21:22:32 +0000 [thread overview]
Message-ID: <bug-219431-137361-017Y0xZOCm@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-219431-137361@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=219431
--- Comment #13 from Mario Limonciello (AMD) (mario.limonciello@amd.com) ---
> I suspect the answer is yes.
Actually; no it should be new, but it's because the frequency calculation was
wrong before.
I found a system with shared mem and I have a theory what's going on is that
frequency invariance is attempting to get setup before all CPUs have probed.
Before the preferred cores code frequency invariance would be calculated from
the first CPU only as _CPC is probed. But with preferred cores code in place
you need ALL _CPC values present to know whether you have preferred cores or
not.
I added some dump stack calls to acpi_cppc_processor_probe when the struct is
parsed:
ACPI CPPC: Parsed CPC struct for CPU: 0
CPU: 0 UID: 0 PID: 23 Comm: cpuhp/0 Not tainted 6.12.0-rc5-00026-g0c7b883226dd
#268
Hardware name: LENOVO 30E1S68903/1046, BIOS S07KT5BA 01/26/2024
Call Trace:
<TASK>
dump_stack_lvl+0x60/0x80
acpi_cppc_processor_probe+0x9fc/0xe50
acpi_soft_cpu_online+0x69/0x160
? __pfx_acpi_soft_cpu_online+0x10/0x10
cpuhp_invoke_callback+0x308/0x4c0
? srso_return_thunk+0x5/0x5f
? __pfx_smpboot_thread_fn+0x10/0x10
cpuhp_thread_fun+0x131/0x210
smpboot_thread_fn+0x187/0x220
kthread+0xdd/0x110
? __pfx_kthread+0x10/0x10
ret_from_fork+0x30/0x50
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
Then I added one to the error sequence.
ACPI CPPC: No CPC descriptor for CPU:1
CPU: 0 UID: 0 PID: 23 Comm: cpuhp/0 Not tainted 6.12.0-rc5-00026-g0c7b883226dd
#268
Hardware name: LENOVO 30E1S68903/1046, BIOS S07KT5BA 01/26/2024
Call Trace:
<TASK>
dump_stack_lvl+0x60/0x80
cppc_get_perf+0x127/0x1c0
amd_get_highest_perf+0x5e/0x80
amd_detect_prefcore+0x7a/0x130
amd_get_boost_ratio_numerator+0x28/0x90
init_freq_invariance_cppc+0xad/0x140
acpi_cppc_processor_probe+0x7ce/0xe50
acpi_soft_cpu_online+0x69/0x160
? __pfx_acpi_soft_cpu_online+0x10/0x10
cpuhp_invoke_callback+0x308/0x4c0
? srso_return_thunk+0x5/0x5f
? __pfx_smpboot_thread_fn+0x10/0x10
cpuhp_thread_fun+0x131/0x210
smpboot_thread_fn+0x187/0x220
kthread+0xdd/0x110
? __pfx_kthread+0x10/0x10
ret_from_fork+0x30/0x50
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
Could not retrieve highest performance (-19)
You can see that in both cases the code runs on CPU0. So it's trying to get
values that won't be initialized until CPU1 is ready.
I think this will help "prevent" the error from coming up:
diff --git a/arch/x86/kernel/acpi/cppc.c b/arch/x86/kernel/acpi/cppc.c
index 5e9325273a9fb..a21c26d1fe65a 100644
--- a/arch/x86/kernel/acpi/cppc.c
+++ b/arch/x86/kernel/acpi/cppc.c
@@ -190,7 +190,7 @@ int amd_detect_prefcore(bool *detected)
break;
}
- for_each_present_cpu(cpu) {
+ for_each_online_cpu(cpu) {
u32 tmp;
int ret;
But it's going to probably break preferred cores detection, so it's not a
correct solution.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2024-10-28 21:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-27 18:43 [Bug 219431] New: [6.12] amd-pstate / Ryzen 5xxx (Zen 3, Vermeer): Could not retrieve highest performance (-19) bugzilla-daemon
2024-10-27 18:43 ` [Bug 219431] " bugzilla-daemon
2024-10-27 18:44 ` bugzilla-daemon
2024-10-27 21:50 ` bugzilla-daemon
2024-10-28 14:20 ` bugzilla-daemon
2024-10-28 15:41 ` bugzilla-daemon
2024-10-28 15:56 ` bugzilla-daemon
2024-10-28 15:57 ` bugzilla-daemon
2024-10-28 16:32 ` bugzilla-daemon
2024-10-28 17:19 ` bugzilla-daemon
2024-10-28 19:22 ` bugzilla-daemon
2024-10-28 19:39 ` bugzilla-daemon
2024-10-28 20:31 ` bugzilla-daemon
2024-10-28 21:22 ` bugzilla-daemon [this message]
2024-10-29 1:50 ` bugzilla-daemon
2024-10-29 7:35 ` bugzilla-daemon
2024-10-29 9:00 ` bugzilla-daemon
2024-10-29 13:59 ` bugzilla-daemon
2024-10-29 14:10 ` bugzilla-daemon
2024-10-29 17:53 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-219431-137361-017Y0xZOCm@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).