You are not logged in.

#1 2024-03-30 19:04:50

jrfernandez
Member
Registered: 2024-03-24
Posts: 18

AMD CPU frequency: CPUFreq subsystem vs kernel modules

CPU clock frequency is available at `/sys/devices/system/cpu/cpuN/cpufreq/scaling_cur_freq` via the CPUFreq subsystem. The Arch wiki Ryzen page (https://wiki.archlinux.org/title/Ryzen) also lists some third party tools that use kernel modules to expose CPU frequency.

Can I simply use the /sys/* values provided by the CPUFreq subsystem or do the kernel modules have better insight or better data for clock speeds?

Offline

#2 2024-03-30 20:59:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,764

Re: AMD CPU frequency: CPUFreq subsystem vs kernel modules

None of the modules in that page talk about frequency monitors so they're for different usecases

Offline

#3 2024-03-31 08:50:23

Thor-x86
Member
From: Java Island, Indonesia
Registered: 2021-10-15
Posts: 15
Website

Re: AMD CPU frequency: CPUFreq subsystem vs kernel modules

Did you mean this?

ryzen_smu — Ryzen SMU is a Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors. Can for example be used for undervolting the 5800x3D.

It exposes advanced parameters including voltage level, TDP, dangerous voltage & clock control, and more. If you just have to read clock frequency, then "/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq" is sufficient and recommended because it's safer than direct SMU access. The SMU access mostly for experienced enthusiast, hardware engineers, and daredevil overclockers.

Can I simply use the /sys/* values provided by the CPUFreq subsystem or do the kernel modules have better insight or better data for clock speeds?

Based on my experience, there is no accuracy/precision/response time difference with direct SMU access. So I recommend you to use "/sys/*" instead, unless you know what you're doing.


Stay curious,
Eric
--------------------------------------------------------------------------------
Mail | PGP Key | GitHub

Offline

Board footer

Powered by FluxBB