You are not logged in.

#1 2023-08-29 19:34:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

According to this, Linux 6.5 should be using the EPP governor by default.  When I boot into linux-6.5.arch1-1 on my 5950X system, I am not seeing that driver in use.

# cpupower frequency-info
analyzing CPU 8:
  driver: acpi-cpufreq
...

If I add the following to my grub menu it does get loaded: amd-pstate=active

# cpupower frequency-info
analyzing CPU 22:
  driver: amd-pstate-epp

From what I see in the distro config, it is configured properly.

make nconfig wrote:

CONFIG_X86_AMD_PSTATE_DEFAULT_MODE:
...
1 -> Disabled
2 -> Passive
3 -> Active (EPP)
4 -> Guided

Thoughts?

Last edited by graysky (2023-08-29 19:35:30)

Offline

#2 2023-08-29 21:06:24

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 703

Re: Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

The AMD P-State driver is now used by default rather than CPUFreq for Zen 2 and newer platforms with the ACPI CPPC (Collaborative Processor Performance Control), currently server platforms do not switch to AMD P-State by default, and no shared memory designs.


Not default yet for shared memory designs, like your CPU is.


Excuse my poor English.

Offline

#3 2023-08-30 04:44:15

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

I also tried with my 5950X and a Gigabyte X570 board.
cppc doesn't show in feature flags, no matter what I set CPPC to in UEFI settings.
I also tried Cool'n'Quiet and enabling X2APIC with René's patch. No luck.

amd_pstate=active amd_pstate.shared_mem=1

works as expected.
I'm guessing your kernel is using shared memory also, as agapito noted.
There was a performance warning about this option in the Linux 6.0 docs, but it was removed since.

Seeing further confirmation now that desktop Zen3 at least lacks cppc.

Docs seem to confirm: “Some new Zen3 processors such as Cezanne provide the MSR registers directly”

Last edited by Ranguvar (2023-08-30 07:50:33)

Offline

#4 2023-08-30 08:27:02

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 703

Re: Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

Ranguvar wrote:

I also tried with my 5950X and a Gigabyte X570 board.
cppc doesn't show in feature flags, no matter what I set CPPC to in UEFI settings.
I also tried Cool'n'Quiet and enabling X2APIC with René's patch. No luck.

amd_pstate=active amd_pstate.shared_mem=1

works as expected.
I'm guessing your kernel is using shared memory also, as agapito noted.
There was a performance warning about this option in the Linux 6.0 docs, but it was removed since.

Seeing further confirmation now that desktop Zen3 at least lacks cppc.

Docs seem to confirm: “Some new Zen3 processors such as Cezanne provide the MSR registers directly”

amd_pstate.shared_mem=1 is not needed anymore, just amd_pstate=active for Zen2 and Zen3 desktop processors.

I recommend this patch for 6.5 kernel: https://raw.githubusercontent.com/Cachy … core.patch
To enable AMD P-State Preferred Core feature: https://www.phoronix.com/news/AMD-Prefe … e-Linux-v2


Excuse my poor English.

Offline

#5 2023-08-30 14:29:24

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,577

Re: Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

agapito wrote:

I recommend this patch for 6.5 kernel: https://raw.githubusercontent.com/Cachy … core.patch
To enable AMD P-State Preferred Core feature: https://www.phoronix.com/news/AMD-Prefe … e-Linux-v2

I believe the preferred core code has a bug that prevents it from working, but the performance benefit once fixed seems small.

https://lore.kernel.org/all/20230829.11 … tcode.com/

EDIT:

agapito wrote:

amd_pstate.shared_mem=1 is not needed anymore, just amd_pstate=active for Zen2 and Zen3 desktop processors.

Tested and confirmed: Both are needed for Zen3 that do not expose 'cppc' in `lscpu` which appear to be all desktop CPUs, with possible exception of APUs.

Last edited by Ranguvar (2023-09-22 05:52:41)

Offline

#6 2023-08-30 16:01:39

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 703

Re: Linux 6.5 defaults AMD P-State "Active" EPP but that is not what I get

Ranguvar wrote:
agapito wrote:

I recommend this patch for 6.5 kernel: https://raw.githubusercontent.com/Cachy … core.patch
To enable AMD P-State Preferred Core feature: https://www.phoronix.com/news/AMD-Prefe … e-Linux-v2

I believe the preferred core code has a bug that prevents it from working, but the performance benefit once fixed seems small.

https://lore.kernel.org/all/20230829.11 … tcode.com/

Oh, I didn't really test the performance, because I knew that the performance gain was going to be small; what I did check is that with that patch, the best cores marked by the firmware were the most used ones.

Anyway, it will be fixed soon.

Last edited by agapito (2023-08-30 16:01:57)


Excuse my poor English.

Offline

Board footer

Powered by FluxBB