Skip to contentSkip to conversation

New: amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

Bug 215800 [email protected] 1 participant 36 messages Apr 5, 2022 – Sep 20, 2023

lore
Share & tools
lore
#0 lore raw

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

            Bug ID: 215800
           Summary: amd-pstate does not allow to set arbitrary maximum CPU
                    frequency above 2200MHz for a desktop Zen 3 CPU
           Product: Power Management
           Version: 2.5
    Kernel Version: 5.17.1
          Hardware: x86-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: cpufreq
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

For my Ryzen 7 5800X I've tried (under root) numbers from 600 000 to 2 200 000 and they all work:

echo $number | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

However anything above 2 200 000 instead makes the CPU stay at 2.2GHz.

This is after booting with acpi-cpufreq and loading amd-pstate with replace=1.

Even switching to the performance governor keeps all the cores at 2.2GHz.

I've also tried the userspace governor and again only frequencies up to 2.2GHz work. Anything above will be ignored.

I've tried to fix the issue by cat cpuinfo_max_freq > scaling_max_freq but that didn't work.

That looks like a bug.

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.
#1 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

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

--- Comment #1 from Artem S. Tashkinov ([email protected]) --- So, now I have this and all the cores are stuck at 2.2GHz:

/sys/devices/system/cpu/cpu0/cpufreq:

amd_pstate_highest_perf:166
scaling_min_freq:550000 scaling_available_governors:conservative ondemand userspace powersave performance schedutil
scaling_governor:ondemand
cpuinfo_max_freq:4929000 amd_pstate_lowest_nonlinear_freq:1752000 amd_pstate_max_freq:4929000
related_cpus:0
scaling_cur_freq:2190255
scaling_setspeed:<unsupported>
affected_cpus:0
scaling_max_freq:4929000
cpuinfo_transition_latency:131072 scaling_driver:amd-pstate
cpuinfo_min_freq:550000

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.
#3 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #3 from Huang Rui ([email protected]) --- Hi Artem,

Thanks for the report. Can you print: "lscpu | grep cppc"?

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.
#4 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #4 from Artem S. Tashkinov ([email protected]) ---

Quoted 1 line

Thanks for the report. Can you print: "lscpu | grep cppc"?

# lscpu | grep -i cppc
returns nothing.
# lscpu --version
lscpu from util-linux 2.37.4

I've loading the amd-pstate driver prior to running it.

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.
#5 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

Joe ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #5 from Joe ([email protected]) ---
"I've tried to fix the issue by cat cpuinfo_max_freq > scaling_max_freq but that didn't work. "

cat does not work. Please use "echo $number > scaling_max_freq".

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.
#6 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #6 from Artem S. Tashkinov ([email protected]) --- (In reply to Joe from comment #5)

Quoted 4 lines

"I've tried to fix the issue by cat cpuinfo_max_freq > scaling_max_freq but that didn't work. "

cat does not work. Please use "echo $number > scaling_max_freq".

From the original post:

Quoted 6 lines

For my Ryzen 7 5800X I've tried (under root) numbers from 600 000 to 2 200 000 and they all work:

echo $number | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

However anything above 2 200 000 instead makes the CPU stay at 2.2GHz.

Echoing the number manually didn't work either.

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.
#7 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #7 from Joe ([email protected]) ---
Created attachment 300747
--> https://bugzilla.kernel.org/attachment.cgi?id=300747&action=edit
Max freq

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.
#8 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #8 from Joe ([email protected]) ---
Attach is the operation step on my side. It works with root privilege.

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.
#9 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #9 from Artem S. Tashkinov ([email protected]) --- (In reply to Joe from comment #7)

Quoted 2 lines

Created attachment 300747 [details]
Max freq

Changing scaling_max_freq makes the CPU stay at frequencies 2.2GHz or below.

Enter e.g. 3000000 (3GHz) as scaling_max_freq for all cores, then observe that scaling_cur_freq never exceeds 2.2GHz.

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.
#10 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #10 from Artem S. Tashkinov ([email protected]) ---
Even restoring scaling_max_freq by setting it to cpuinfo_max_freq doesn't fix the issue.

Again, I'm repeating what I already said in the original bug report.

Quoted 6 lines

For my Ryzen 7 5800X I've tried (under root) numbers from 600 000 to 2 200 000 and they all work:

echo $number | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

However anything above 2 200 000 instead makes **the CPU stay at 2.2GHz**.

Don't mind scaling_max_freq, it's scaling_cur_freq that never exceeds 2.2GHz!

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.
#11 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #11 from Joe ([email protected]) ---
OK, so it seems you change the scaling_max_freq to 2.2G, after that, even you change back to 3G or cpuinfo_max_freq, the scaling_cur_freq is still less than 2.2GHz.

I tried 2 devices on my local, can not reproduce this issue.

After you set scaling_max_freq to 3G or higher, You can try to run "stress --cpu 128" with increasing the workload to check if the scaling_cur_freq can exceeds 2.2GHz.

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.
#12 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #12 from Artem S. Tashkinov ([email protected]) --- (In reply to Joe from comment #11)

Quoted 9 lines

OK, so it seems you change the scaling_max_freq to 2.2G, after that, even you change back to 3G or cpuinfo_max_freq, the scaling_cur_freq is still less than 2.2GHz.

I tried 2 devices on my local, can not reproduce this issue.

After you set scaling_max_freq to 3G or higher, You can try to run "stress --cpu 128" with increasing the workload to check if the scaling_cur_freq can exceeds 2.2GHz.

I've run tests now a dozen times already: once I change cpuinfo_max_freq my CPU never goes above 2.2GHz no matter what I do even if I restore the value stored in this variable/file.

This is further corroborated by more than halved performance and decreased power consumption - it doesn't go above ~55W.

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.
#13 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #13 from Artem S. Tashkinov ([email protected]) --- Created attachment 300750
--> https://bugzilla.kernel.org/attachment.cgi?id=300750&action=edit
/sys/devices/system/cpu/cpufreq

The entire /sys/devices/system/cpu/cpufreq tar.bz2'ed after running an intensive MT task for a few minutes.

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.
#14 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #14 from Artem S. Tashkinov ([email protected]) --- Here's another weirdness/quirk:

After suspending and resuming the maximum CPU frequency increases to 3800MHz (which is the base frequency for Ryzen 7 5800X).

Boost is _enabled_.

Not sure if it warrants yet another bug report.

Let's limit them to three.

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.
#15 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #15 from [email protected] ---
(In reply to Artem S. Tashkinov from comment #0)

Quoted 12 lines

For my Ryzen 7 5800X I've tried (under root) numbers from 600 000 to 2 200 000 and they all work:

echo $number | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

However anything above 2 200 000 instead makes the CPU stay at 2.2GHz.

This is after booting with acpi-cpufreq and loading amd-pstate with replace=1.

Even switching to the performance governor keeps all the cores at 2.2GHz.

Quoted 7 lines

I've also tried the userspace governor and again only frequencies up to 2.2GHz work. Anything above will be ignored.

I've tried to fix the issue by cat cpuinfo_max_freq > scaling_max_freq but that didn't work.

That looks like a bug.

Could you help to try the below kernel ?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/cpufreq/amd-pstate.c?h=next-20220516

I tried this kernel, but 5950x cannot reproduce the issue as yours.

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.
#16 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #16 from Artem S. Tashkinov ([email protected]) --- (In reply to perry_yuan from comment #15)

Quoted 6 lines

Could you help to try the below kernel ?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/
drivers/cpufreq/amd-pstate.c?h=next-20220516

I tried this kernel, but 5950x cannot reproduce the issue as yours.

Does this patch require enabling debugging in the kernel? I'm not sure how I am supposed to share (debug) data once I've applied it.

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.
#17 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #17 from [email protected] ---
(In reply to Artem S. Tashkinov from comment #16)

Quoted 10 lines

(In reply to perry_yuan from comment #15)

Quoted 6 lines

Could you help to try the below kernel ?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/
drivers/cpufreq/amd-pstate.c?h=next-20220516

I tried this kernel, but 5950x cannot reproduce the issue as yours.

Does this patch require enabling debugging in the kernel? I'm not sure how I am supposed to share (debug) data once I've applied it.

Hi Artem.
I mean you could build the kernel and install it on your system. and switch the governor , capture the min/max log ,etc.

I do not find the reproducing way, but I still want to try to reproduce the issue if you can confirm the kernel link has same problem.

Perry.

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.
#18 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #18 from [email protected] ---
(In reply to Artem S. Tashkinov from comment #0)

Quoted 12 lines

For my Ryzen 7 5800X I've tried (under root) numbers from 600 000 to 2 200 000 and they all work:

echo $number | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

However anything above 2 200 000 instead makes the CPU stay at 2.2GHz.

This is after booting with acpi-cpufreq and loading amd-pstate with replace=1.

Even switching to the performance governor keeps all the cores at 2.2GHz.

Quoted 7 lines

I've also tried the userspace governor and again only frequencies up to 2.2GHz work. Anything above will be ignored.

I've tried to fix the issue by cat cpuinfo_max_freq > scaling_max_freq but that didn't work.

That looks like a bug.

I would like to confirm which kernel version or patch cause the regression, so need you help to verify the regression root cause, then I will reproduce the issue to fix it on my side.

Perry

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.
#19 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #19 from Artem S. Tashkinov ([email protected]) --- All the same with 5.18.3.

Steps to reproduce:

echo 3000000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

Now all the CPU cores are stuck below 2.2GHz.

This is after modprobe amd-pstate replace=1

I really don't understand what else I can do. This is reproducible with a single command on my Ryzen 7 5800X CPU.

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.
#20 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #20 from Artem S. Tashkinov ([email protected]) ---

Quoted 1 line

capture the min/max log

Now idea how to do that, where is it logged.

/sys/devices/system/cpu/cpu0/acpi_cppc contains this:

feedback_ctrs:ref:1185870842796 del:939045433401
lowest_nonlinear_perf:59
highest_perf:186
nominal_freq:3801
lowest_freq:550
nominal_perf:128
lowest_perf:19
reference_perf:128
wraparound_time:18446744073709551615

No idea what highest_perf is - it's a read only value anyways. No idea what its scale is, 0-255? Why is so below the maximum value?

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.
#21 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #21 from Artem S. Tashkinov ([email protected]) --- /sys/devices/system/cpu/cpufreq/policy0

amd_pstate_highest_perf:166
scaling_min_freq:550000 scaling_available_governors:conservative ondemand userspace powersave performance schedutil
scaling_governor:ondemand
cpuinfo_max_freq:4929000 amd_pstate_lowest_nonlinear_freq:1752000 amd_pstate_max_freq:4929000
related_cpus:0
scaling_cur_freq:1247422
scaling_setspeed:<unsupported>
affected_cpus:0
scaling_max_freq:1600000
cpuinfo_transition_latency:131072 scaling_driver:amd-pstate
cpuinfo_min_freq:550000

Why do I have two wildly different amd_pstate_highest_perf=166 and highest_perf=186?

What's the relationship between the two?

Anyways, the issue remains. As far as I can see
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/cpufreq/amd-pstate.c
has seen near zero activity for the past three months.

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.
#22 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
     Kernel Version|5.17.1                      |5.18.3
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.
#23 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #22 from [email protected] ---
(In reply to Artem S. Tashkinov from comment #21)

Quoted 22 lines

/sys/devices/system/cpu/cpufreq/policy0

amd_pstate_highest_perf:166
scaling_min_freq:550000 scaling_available_governors:conservative ondemand userspace powersave performance schedutil
scaling_governor:ondemand
cpuinfo_max_freq:4929000 amd_pstate_lowest_nonlinear_freq:1752000 amd_pstate_max_freq:4929000
related_cpus:0
scaling_cur_freq:1247422
scaling_setspeed:<unsupported>
affected_cpus:0
scaling_max_freq:1600000
cpuinfo_transition_latency:131072 scaling_driver:amd-pstate
cpuinfo_min_freq:550000

Why do I have two wildly different amd_pstate_highest_perf=166 and highest_perf=186?

Quoted 6 lines

What's the relationship between the two?

Anyways, the issue remains. As far as I can see
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/
drivers/cpufreq/amd-pstate.c has seen near zero activity for the past three months.

modprobe amd-pstate replace=1(In reply to Artem S. Tashkinov from comment #19)

Quoted 4 lines

All the same with 5.18.3.

Steps to reproduce:

Quoted 8 lines

echo 3000000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

Now all the CPU cores are stuck below 2.2GHz.

This is after modprobe amd-pstate replace=1

I really don't understand what else I can do. This is reproducible with a single command on my Ryzen 7 5800X CPU.

Please drop the replace parameter when loading driver, that patch is not merged by upstream yet.

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.
#24 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #23 from Artem S. Tashkinov ([email protected]) --- (In reply to perry_yuan from comment #22)

Quoted 2 lines

Please drop the replace parameter when loading driver, that patch is not merged by upstream yet.

This is reproducible when booting with the amd-pstate driver.

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.
#25 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #24 from Artem S. Tashkinov ([email protected]) ---
Is this driver (development) dead now that there's a new AMD driver for CPPC?

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.
#26 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

Mario Limonciello (AMD) ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
           Hardware|x86-64                      |AMD
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.
#27 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #25 from Artem S. Tashkinov ([email protected]) --- In kernel 6.3.12 limiting CPU frequency doesn't work at all:

echo 3000000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

Average across all cores and maximum frequencies that I observe now are:
3726MHz and 4898MHz.

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.
#28 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #26 from Artem S. Tashkinov ([email protected]) --- amd_pstate_highest_perf is readonly, I cannot write to it.

/sys/devices/system/cpu/cpufreq/policy0 $ grep -r . energy_performance_available_preferences:default performance balance_performance balance_power power amd_pstate_highest_perf:166 scaling_min_freq:550000 scaling_available_governors:performance powersave scaling_governor:powersave cpuinfo_max_freq:4929000 amd_pstate_lowest_nonlinear_freq:1752000 amd_pstate_max_freq:4929000
related_cpus:0
scaling_cur_freq:550000 scaling_setspeed:<unsupported>
affected_cpus:0
scaling_max_freq:3000000 cpuinfo_transition_latency:0 energy_performance_preference:performance scaling_driver:amd-pstate-epp cpuinfo_min_freq:550000

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.
#29 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #27 from Artem S. Tashkinov ([email protected]) --- I've even tried this:

echo 600000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq

Zero effect. scaling_max_freq is ignored.

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.
#30 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #28 from Mario Limonciello (AMD) ([email protected]) --- When you're using active mode (EPP), the hardware is choosing frequencies and software only provides a hint to set bias.

You can read a little bit more about active mode at
https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html

What you should be doing isn't trying to set specific frequency targets, but rather you should change the values of 'energy_performance_preference' to meet the needs for your workload.

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.
#31 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #29 from Artem S. Tashkinov ([email protected]) --- (In reply to Mario Limonciello (AMD) from comment #28)

Quoted 9 lines

When you're using active mode (EPP), the hardware is choosing frequencies and software only provides a hint to set bias.

You can read a little bit more about active mode at
https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html

What you should be doing isn't trying to set specific frequency targets, but rather you should change the values of 'energy_performance_preference' to meet the needs for your workload.

Thanks Mario.

Would be great if the documentation was updated in this case and the variable removed altogether if the amd-pstate driver is active. I know it's possible.

It's a little bit confusing though, as in Windows I can perfectly set minimum and maximum CPU frequencies and I totally expected this driver to actually allow that.

Now you're saying I need to work with "energy_performance_preference" which doesn't even look like something I can properly configure.

Lastly the documentation mentions: energy_performance_available_preferences, the file that I don't have.

In short it looks like everything is in a deep state of flux.

Lastly there's no boost configuration support which is available both for acpi-cpufreq and Intel's native CPPC driver.

I'll retest the drive in a year. I don't like anything about how it works, functions and its configuration options. It's worse than acpi-cpufreq from seemingly any PoV. Maybe there are some advantages for APUs but on my desktop I only see major disadvantages.

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.
#32 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #30 from Mario Limonciello (AMD) ([email protected]) ---

Quoted 3 lines

It's a little bit confusing though, as in Windows I can perfectly set minimum and maximum CPU frequencies and I totally expected this driver to actually allow that.

I suppose I'm confused as well. Windows should be using EPP as well, and various software constructs like the power slider will be changing that bias.

Maybe you can better explain exactly what you do in Windows and exactly what is happening.

Quoted 2 lines

Lastly the documentation mentions: energy_performance_available_preferences, the file that I don't have.

Eh? Didn't your above comment show this:

/sys/devices/system/cpu/cpufreq/policy0 $ grep -r . energy_performance_available_preferences:default performance balance_performance balance_power power

Quoted 2 lines

Lastly there's no boost configuration support which is available both for acpi-cpufreq and Intel's native CPPC driver.

Something seems quite wrong if you're not getting boost support. It registers for boost, see
https://github.com/torvalds/linux/blob/v6.4/drivers/cpufreq/amd-pstate.c#L1121

Quoted 2 lines

It's worse than acpi-cpufreq from seemingly any PoV. Maybe there are some advantages for APUs but on my desktop I only see major disadvantages

I /suspect/ what you'll want to do is change the scaling_governor from 'powersave' to 'performance' for your desktop use case.

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.
#33 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #31 from Artem S. Tashkinov ([email protected]) --- Created attachment 304797
--> https://bugzilla.kernel.org/attachment.cgi?id=304797&action=edit
Power Options Processor Power Management in Windows.png

(In reply to Mario Limonciello (AMD) from comment #30)

Quoted 10 lines
Quoted 1 line

It's a little bit confusing though, as in Windows I can perfectly set

minimum

Quoted 2 lines

and maximum CPU frequencies and I totally expected this driver to actually allow that.

I suppose I'm confused as well. Windows should be using EPP as well, and various software constructs like the power slider will be changing that bias.

Maybe you can better explain exactly what you do in Windows and exactly what is happening.

In Windows I'm free to set minimum and maximum CPU clock speeds to my liking.

Why is it necessary?

1) For instance you want to do benchmarking at certain clock speeds which are not known to be hitting TDP/TTP/temperature limits, thus they show the true potential of your CPU.

2) For instance you want to make you CPU run cooler with a very precise control.

Quoted 11 lines
Quoted 2 lines

Lastly the documentation mentions:

energy_performance_available_preferences,

Quoted 1 line

the file that I don't have.

Eh? Didn't your above comment show this:

/sys/devices/system/cpu/cpufreq/policy0 $ grep -r . energy_performance_available_preferences:default performance balance_performance balance_power power

Quoted 7 lines
Quoted 2 lines

Lastly there's no boost configuration support which is available both for acpi-cpufreq and Intel's native CPPC driver.

Something seems quite wrong if you're not getting boost support. It registers for boost, see
https://github.com/torvalds/linux/blob/v6.4/drivers/cpufreq/amd-pstate.
c#L1121

Will recheck in 6.4.x soon.

Quoted 6 lines
Quoted 3 lines

It's worse than acpi-cpufreq from seemingly any PoV. Maybe there are some advantages for APUs but on my desktop I only see major disadvantages

I /suspect/ what you'll want to do is change the scaling_governor from 'powersave' to 'performance' for your desktop use case.

These two options are very coarse vs. being simply able to set maximum clock speeds.

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.
#34 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

--- Comment #32 from Artem S. Tashkinov ([email protected]) ---
In kernel 6.5 the values of /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq are simply ignored.

Looks like setting the maximum operating CPU frequency is no longer supported.

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.
#35 lore raw

[Bug 215800] amd-pstate does not allow to set arbitrary maximum CPU frequency above 2200MHz for a desktop Zen 3 CPU

In reply to [email protected]

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

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #33 from Artem S. Tashkinov ([email protected]) ---

*** This bug has been marked as a duplicate of bug 217931 ***

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.