From: Aaron Rainbolt <arainbolt@kfocus.org>
To: srinivas.pandruvada@linux.intel.com, lenb@kernel.org,
rafael@kernel.org, viresh.kumar@linaro.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
mmikowski@kfocus.org
Subject: /sys/devices/system/cpu/cpu* frequency info different between kernels 6.8 and 6.11
Date: Wed, 19 Mar 2025 10:09:42 -0500 [thread overview]
Message-ID: <20250319100942.578b815d@kf-m2g5> (raw)
I haven't looked super closely into this yet (haven't compiled a
mainline kernel and tested it), but it seems that the CPU frequency
info under /sys/devices/system/cpu/cpu* has changed behavior, at least
on Intel CPUs. In particular, the frequencies shown under
/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq used to show the
maximum CPU frequency the hardware supported, even if turbo boost was
turned off in the intel_pstate driver. (This was the behavior in
kernels 6.8 and prior.) In kernel 6.11 however, they show the maximum
CPU frequency the hardware supports in its current turbo mode, meaning
that if turbo boost is turned off, the maximum CPU frequency shown is
much lower than it is when turbo boost is turned on. This is a bit of a
problem, because some userspace tools (for instance Kubuntu Focus's
Power and Fan tool) depend on cpuinfo_max_freq showing the maximum
frequency of the CPU regardless of turbo boost state, and rely on
base_frequency to show the maximum frequency without turbo boost
enabled. Now in order to read the maximum turbo boost frequency, you
have to at least temporarily enable turbo boost, then read the
frequency info.
To illustrate the issue:
┌─╴aaron@kf-m2g5:/sys/devices/system/cpu/cpu0/cpufreq
└─╴$ echo '0' | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo > /dev/null
┌─╴aaron@kf-m2g5:/sys/devices/system/cpu/cpu0/cpufreq
└─╴$ grep . *
affected_cpus:0
base_frequency:2200000
cpuinfo_max_freq:5600000
cpuinfo_min_freq:800000
cpuinfo_transition_latency:20000
energy_performance_available_preferences:default performance balance_performance balance_power power
energy_performance_preference:balance_performance
related_cpus:0
scaling_available_governors:conservative ondemand userspace powersave performance schedutil
scaling_cur_freq:1458327
scaling_driver:intel_cpufreq
scaling_governor:ondemand
scaling_max_freq:5600000
scaling_min_freq:800000
scaling_setspeed:<unsupported>
┌─╴aaron@kf-m2g5:/sys/devices/system/cpu/cpu0/cpufreq
└─╴$ echo '1' | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo > /dev/null
┌─╴aaron@kf-m2g5:/sys/devices/system/cpu/cpu0/cpufreq
└─╴$ grep . *
affected_cpus:0
base_frequency:2200000
cpuinfo_max_freq:2200000
cpuinfo_min_freq:800000
cpuinfo_transition_latency:20000
energy_performance_available_preferences:default performance balance_performance balance_power power
energy_performance_preference:balance_performance
related_cpus:0
scaling_available_governors:conservative ondemand userspace powersave performance schedutil
scaling_cur_freq:917829
scaling_driver:intel_cpufreq
scaling_governor:ondemand
scaling_max_freq:2200000
scaling_min_freq:800000
scaling_setspeed:<unsupported>
This is happening on Ubuntu 24.04 using a 6.11.0-series kernel.
Does this seem like a bug? If so, should I try reproduce it with a
mainline kernel and find the commit that introduced it?
Regards,
Aaron
reply other threads:[~2025-03-19 15:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250319100942.578b815d@kf-m2g5 \
--to=arainbolt@kfocus.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mmikowski@kfocus.org \
--cc=rafael@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox