| adfe0057 | 23-Jul-2026 |
Sang-Heon Jeon <ekffu200098@gmail.com> |
cpupower: remove conditional return with no effect
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly.
This is the result of runni
cpupower: remove conditional return with no effect
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly.
This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci.
Link: https://lore.kernel.org/linux-pm/20260723184538.3888637-36-ekffu200098@gmail.com/raw Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 5100bd35 | 10-Jul-2026 |
Jeremy Linton <jeremy.linton@arm.com> |
cpupower: Print kernel and hardware frequency information
The kernel asserted frequency from scaling_cur_freq may not always match the hardware reported frequency from cpuinfo_cur_freq.
Print both
cpupower: Print kernel and hardware frequency information
The kernel asserted frequency from scaling_cur_freq may not always match the hardware reported frequency from cpuinfo_cur_freq.
Print both values when they are available, and only print the unavailable message on x86 when the hardware frequency can't be read.
Link: https://lore.kernel.org/r/20260709221344.1919794-4-jeremy.linton@arm.com Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 6b8ff068 | 10-Jul-2026 |
Jeremy Linton <jeremy.linton@arm.com> |
cpupower: Build and call CPPC information on non-AMD processors
Now that we have a generic CPPC printout, call it on !AMD processors. If it fails to detect CPPC, or the registers don't look reasonab
cpupower: Build and call CPPC information on non-AMD processors
Now that we have a generic CPPC printout, call it on !AMD processors. If it fails to detect CPPC, or the registers don't look reasonable then it will exit without printing anything.
Link: https://lore.kernel.org/r/20260709221344.1919794-3-jeremy.linton@arm.com Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 3817b1d3 | 09-Feb-2026 |
Zhang Rui <rui.zhang@intel.com> |
cpupower: Add intel_pstate turbo boost support for Intel platforms
On modern Intel platforms, the intel_pstate driver is commonly used and it provides turbo boost control via /sys/devices/system/cpu
cpupower: Add intel_pstate turbo boost support for Intel platforms
On modern Intel platforms, the intel_pstate driver is commonly used and it provides turbo boost control via /sys/devices/system/cpu/intel_pstate/no_turbo.
However, cpupower doesn't handle this. it 1. shows turbo boost as "active" blindly for Intel platforms 2. controls turbo boost functionality via the generic /sys/devices/system/cpu/cpufreq/boost sysfs interface only.
Enhance the cpupower tool to ensure the "--boost" command works seamlessly on Intel platforms with intel_pstate driver running.
Without this patch, $ echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo 1 $ sudo cpupower frequency-info --boost analyzing CPU 21: boost state support: Supported: yes Active: yes $ sudo cpupower set --boost 0 Error setting turbo-boost $ sudo cpupower set --boost 1 Error setting turbo-boost
With this patch, $ cat /sys/devices/system/cpu/intel_pstate/no_turbo 0 $ sudo cpupower set --boost 0 $ sudo cpupower frequency-info --boost analyzing CPU 21: boost state support: Supported: yes Active: no $ cat /sys/devices/system/cpu/intel_pstate/no_turbo 1 $ sudo cpupower set --boost 1 $ sudo cpupower frequency-info --boost analyzing CPU 28: boost state support: Supported: yes Active: yes $ cat /sys/devices/system/cpu/intel_pstate/no_turbo 0
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| ff72619e | 02-Dec-2025 |
Kaushlendra Kumar <kaushlendra.kumar@intel.com> |
tools/power cpupower: Show C0 in idle-info dump
`cpupower idle-info -o` skipped C0 because the loop began at 1:
before: states: C1 ... latency[002] residency[00002] C2 ... latency
tools/power cpupower: Show C0 in idle-info dump
`cpupower idle-info -o` skipped C0 because the loop began at 1:
before: states: C1 ... latency[002] residency[00002] C2 ... latency[010] residency[00020] C3 ... latency[133] residency[00600]
after: states: C0 ... latency[000] residency[00000] C1 ... latency[002] residency[00002] C2 ... latency[010] residency[00020] C3 ... latency[133] residency[00600]
Start iterating at index 0 so the idle report mirrors sysfs and includes C0 stats.
Link: https://lore.kernel.org/r/20251202065403.1492807-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 24858a84 | 26-Nov-2025 |
Kaushlendra Kumar <kaushlendra.kumar@intel.com> |
tools/cpupower: Fix inverted APERF capability check
The capability check was inverted, causing the function to return error when APERF support is available and proceed when it is not.
Negate the co
tools/cpupower: Fix inverted APERF capability check
The capability check was inverted, causing the function to return error when APERF support is available and proceed when it is not.
Negate the condition to return error only when APERF capability is absent.
Link: https://lore.kernel.org/r/20251126091613.567480-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 357d1fc3 | 22-May-2025 |
Shinji Nomoto <fj5851bi@fujitsu.com> |
cpupower: Allow control of boost feature on non-x86 based systems with boost support.
The cpufreq subsystem has a generic sysfs interface for controlling boost (/sys/devices/system/cpu/cpufreq/boost
cpupower: Allow control of boost feature on non-x86 based systems with boost support.
The cpufreq subsystem has a generic sysfs interface for controlling boost (/sys/devices/system/cpu/cpufreq/boost). The sysfs interface can be used to enable boost control from the cpupower command on non-x86 platforms as well. So, allow boost controlling on non-x86 system if boost sysfs file exists.
The set subcommand enables/disables the boost feature using the following syntax: cpupower set --boost 1 cpupower set --boost 0
The --boost option is an alias for --turbo-boost. We provided the neutral option name because the name "turbo boost" is specific to Intel technology.
The frequency-info subcommand displays the enabled/disabled state of the boost feature as follows: boost state support: Active: yes (or no)
Link: https://lore.kernel.org/r/20250522061122.2149188-3-fj5851bi@fujitsu.com Signed-off-by: Shinji Nomoto <fj5851bi@fujitsu.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 14a3318b | 12-Jun-2025 |
Gautham R. Shenoy <gautham.shenoy@amd.com> |
pm: cpupower: Fix printing of CORE, CPU fields in cpupower-monitor
After the commit 0014f65e3df0 ("pm: cpupower: remove hard-coded topology depth values"), "cpupower monitor" output ceased to print
pm: cpupower: Fix printing of CORE, CPU fields in cpupower-monitor
After the commit 0014f65e3df0 ("pm: cpupower: remove hard-coded topology depth values"), "cpupower monitor" output ceased to print the CORE and the CPU fields on a multi-socket platform.
The reason for this is that the patch changed the behaviour to break out of the switch-case after printing the PKG details, while prior to the patch, the CORE and the CPU details would also get printed since the "if" condition check would pass for any level whose topology depth was lesser than that of a package.
Fix this ensuring all the details below a desired topology depth are printed in the cpupower monitor output.
Link: https://lore.kernel.org/r/20250612122355.19629-3-gautham.shenoy@amd.com Fixes: 0014f65e3df0 ("pm: cpupower: remove hard-coded topology depth values") Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 0014f65e | 05-Mar-2025 |
Shuah Khan <skhan@linuxfoundation.org> |
pm: cpupower: remove hard-coded topology depth values
Remove hard-coded topology depth values and replace them with defines to improve code readability and maintainability in cpupower-monitor code.
pm: cpupower: remove hard-coded topology depth values
Remove hard-coded topology depth values and replace them with defines to improve code readability and maintainability in cpupower-monitor code.
Link: https://lore.kernel.org/r/20250305225342.19447-3-skhan@linuxfoundation.org Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| d52d2b31 | 05-Mar-2025 |
Shuah Khan <skhan@linuxfoundation.org> |
pm: cpupower: Fix cmd_monitor() error legs to free cpu_topology
cmd_monitor() calls get_cpu_topology() to allocate memory for cpu topology and fails to release in error legs.
Fix it to call cpu_top
pm: cpupower: Fix cmd_monitor() error legs to free cpu_topology
cmd_monitor() calls get_cpu_topology() to allocate memory for cpu topology and fails to release in error legs.
Fix it to call cpu_topology_release() from error legs.
Link: https://lore.kernel.org/r/20250305225342.19447-2-skhan@linuxfoundation.org Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 8395d439 | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Adjust whitespace for amd-pstate specific prints
The amd-pstate section is grouped under boost, which isn't appropriate.
Adjust the indentation so that it is it's own section.
Link: http
cpupower: Adjust whitespace for amd-pstate specific prints
The amd-pstate section is grouped under boost, which isn't appropriate.
Adjust the indentation so that it is it's own section.
Link: https://lore.kernel.org/r/20241218191144.3440854-8-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| acf71265 | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Don't fetch maximum latency when EPP is enabled
When EPP has been enabled the hardware will autonomously change frequencies on it's own and thus there is no latency with changing from the
cpupower: Don't fetch maximum latency when EPP is enabled
When EPP has been enabled the hardware will autonomously change frequencies on it's own and thus there is no latency with changing from the kernel.
Avoid doing the maximum latency check when EPP is found. This will apply to both amd-pstate and intel-pstate drivers.
Link: https://lore.kernel.org/r/20241218191144.3440854-7-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 5f567afc | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Add support for showing energy performance preference
The EPP value is useful for characterization of performance. Show it in cpupower frequency-info output.
Link: https://lore.kernel.org
cpupower: Add support for showing energy performance preference
The EPP value is useful for characterization of performance. Show it in cpupower frequency-info output.
Link: https://lore.kernel.org/r/20241218191144.3440854-6-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 26e16174 | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Don't try to read frequency from hardware when kernel uses aperfmperf
When the amd-pstate is in use frequency is set by the hardware and measured by the kernel through using the aperf and
cpupower: Don't try to read frequency from hardware when kernel uses aperfmperf
When the amd-pstate is in use frequency is set by the hardware and measured by the kernel through using the aperf and mperf registers.
There is no direct call to the hardware to indicate current frequency.
Detect that this feature is in use and skip the check.
Link: https://lore.kernel.org/r/20241218191144.3440854-5-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 6d4a2987 | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Add support for amd-pstate preferred core rankings
The rankings are useful information to determine if the scheduler is placing tasks appropriately for the hardware.
Link: https://lore.ke
cpupower: Add support for amd-pstate preferred core rankings
The rankings are useful information to determine if the scheduler is placing tasks appropriately for the hardware.
Link: https://lore.kernel.org/r/20241218191144.3440854-4-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| dec2f97a | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Remove spurious return statement
print_duration() has a return; statement at the end of the function that is not necessary as it's a void function.
Link: https://lore.kernel.org/r/2024121
cpupower: Remove spurious return statement
print_duration() has a return; statement at the end of the function that is not necessary as it's a void function.
Link: https://lore.kernel.org/r/20241218191144.3440854-2-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 9d6c0e58 | 12-Dec-2024 |
He Rongguang <herongguang@linux.alibaba.com> |
cpupower: fix TSC MHz calculation
Commit 'cpupower: Make TSC read per CPU for Mperf monitor' (c2adb1877b7) changes TSC counter reads per cpu, but left time diff global (from start of all cpus to end
cpupower: fix TSC MHz calculation
Commit 'cpupower: Make TSC read per CPU for Mperf monitor' (c2adb1877b7) changes TSC counter reads per cpu, but left time diff global (from start of all cpus to end of all cpus), thus diff(time) is too large for a cpu's tsc counting, resulting in far less than acutal TSC_Mhz and thus `cpupower monitor` showing far less than actual cpu realtime frequency.
/proc/cpuinfo shows frequency: cat /proc/cpuinfo | egrep -e 'processor' -e 'MHz' ... processor : 171 cpu MHz : 4108.498 ...
before fix (System 100% busy): | Mperf || Idle_Stats CPU| C0 | Cx | Freq || POLL | C1 | C2 171| 0.77| 99.23| 2279|| 0.00| 0.00| 0.00
after fix (System 100% busy): | Mperf || Idle_Stats CPU| C0 | Cx | Freq || POLL | C1 | C2 171| 0.46| 99.54| 4095|| 0.00| 0.00| 0.00
Fixes: c2adb1877b76 ("cpupower: Make TSC read per CPU for Mperf monitor") Signed-off-by: He Rongguang <herongguang@linux.alibaba.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|