Cpufreq driver on x86_64 (22.03-SNAPSHOT)

I wanted to use collectd-mod-cpufreq plugin on x86_64, but it ended up being half-broken: CPU frequency is collected, but not the more detailed information.

collectd[12175]: cpufreq plugin: File /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state not exists or no access. 
P-State statistics will not be reported. 
Check if `cpufreq-stats' kernel module is loaded.

I checked the config and this module is supposedly built:

./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_STAT=y

While at it, I noticed that the ondemand governor is supposed to be built and be used by default, but it is not even available. While powrsave is disabled in the config, yet it is present and a default one.

./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
./target/linux/x86/config-5.10:# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_GOV_ATTR_SET=y
./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_GOV_COMMON=y
./target/linux/x86/config-5.10:# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_GOV_ONDEMAND=y
./target/linux/x86/config-5.10:CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
./target/linux/x86/config-5.10:# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
./target/linux/x86/config-5.10:# CONFIG_CPU_FREQ_GOV_USERSPACE is not set

cat /sys/devices/system/cpu/cpufreq/policy?/scaling_available_governors
performance powersave
performance powersave
performance powersave
performance powersave

cat /sys/devices/system/cpu/cpufreq/policy?/scaling_governor
powersave
powersave
powersave
powersave

I am using the image builder to spin up my image with all the config. What am I doing wrong that I am not seeing the ondemand governor and cpufreq-stats is missing?

It is because pstates are enabled, which causes the kernel to use intel_pstate instead of cpufreq. The old behaviour can be activated by adding intel_pstate=disable to /boot/grub/grub.cfg. That fixes collectd-mod-cpufreq.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.