You are not logged in.

#1 2024-09-01 12:30:43

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

AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

If I boot into Arch on a mini PC (AMD Ryzen 7/5800U) with amd-pstate=active under linux-lts (currently 6.6.48), I find that while idle, most of the cores sit at 400 MHz.  If I boot the identical hardware into OpenWrt on the same 6.6.48 kernel with the same kernel parameter for pstates=active, I am finding that while idle (all daemons disabled) the cores sit at 1384 MHz.

Both distros are showing the same values for:

# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
powersave
# cat /sys/devices/system/cpu/amd_pstate/status
active
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver
amd-pstate-epp

I am wondering what kernel config differences in Arch's linux-lts might account for this.

Our linux-lts config
OpenWrt's config

Last edited by graysky (2024-09-03 00:16:44)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2024-09-01 15:51:19

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

Re: AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

Are you sure OpenWrt is using the powersave governor? It's not even compiled in their kernel according to the config file:

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set


Excuse my poor English.

Offline

#3 2024-09-01 17:34:02

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

Re: AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

I modified the config inserting the Arch kernel-lts lines but I get the same result under OpenWrt:

# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
powersave

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2024-09-01 20:04:14

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

Does amd_pstate_epp build and is it loaded?
Have you tried to build the OpenWRT kernel w/ the arch config to see whether this is actually the cause (or to boot OpenWRT w/ the arch kernel, assuming that's possible)

Offline

#5 2024-09-01 20:43:21

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

Re: AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

Yes, it is loaded, the following on booted into OpenWrt.  Building with the Arch config would be tough since OpenWrt splits their config options in two or three files for x86/86 (1. generic 2. x86 (I think) and 3. x86/64).

# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
powersave
# cat /sys/devices/system/cpu/amd_pstate/status
active
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver
amd-pstate-epp

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2024-09-03 00:16:29

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

Re: AMD pstate=active gives lower idle on Arch vs OpenWrt ... why [solved]

I figured out the cause, Arch uses a tickless timer and OpenWrt does not.  Building a tickless timer on OpenWrt fixes it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB