summaryrefslogtreecommitdiff
path: root/tools/power/x86/intel-speed-select
AgeCommit message (Collapse)Author
2025-05-09tools/power/x86/intel-speed-select: v1.23 releaseSrinivas Pandruvada
This version includes the following changes: - Displays SST-PP2 revision fields. - Skips updating uncore frequency limits on newer generations of CPUs. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-05-09tools/power/x86/intel-speed-select: Skip uncore frequency updateSrinivas Pandruvada
On SST PP level switch, skip adjusting the uncore frequency limit and allow the hardware to handle this on newer platforms. As newer generations of CPUs have changed the extended family identifier, use this identifier to exclude the update. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-05-09tools/power/x86/intel-speed-select: Support SST PP revision 2 fieldsSrinivas Pandruvada
Display fields added by SST PP revision 2. They include: uncore P0 (max frequency), P1 (base frequency) and Pm (min frequency) for uncore fabric 1. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-03-07tools/power/x86/intel-speed-select: v1.22 releaseSrinivas Pandruvada
This version has fix for: - Display of die ID and optimize array size for multi package systems. - Fix build warning with cross compiler Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-03-07tools/power/x86/intel-speed-select: Prefix header search path with sysrootKhem Raj
This helps when using a cross-compiler for building intel-speed-select, currently, its hardcoded to pick libnl3 headers from build host which may not be same as build target when cross compiling. cc -print-sysroot will print nothing if compiler is configured without a sysroot and result in same string as it is now. Fixes errors with gcc configured with host include poisoning e.g. cc1: error: include location "/usr/include/libnl3" is unsafe for cross-compilation [-Werror=poison-system-directories] Signed-off-by: Khem Raj <raj.khem@gmail.com> [ srinivas: Changelog edits for checkpatch warning ] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-03-07tools/power/x86/intel-speed-select: Die ID for IO diesSrinivas Pandruvada
Instead of displaying "-1" for IO dies, display "IO". Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-03-07tools/power/x86/intel-speed-select: Fix the condition to check multi die systemSrinivas Pandruvada
Even when there is no die exported by CPUID leaf 0x1F, the kernel version after 6.9 will show non zero die_id in the sysfs. In that case maximum die_id can still match maximum power domain ID. So the condition to check if the power domain ID is same a die_id to prevent duplicate display doesn't hold true. The better condition is to check if the maximum die_id is more than the maximum package_id. If the die_id is exposed by CPUID leaf 0x1F, the maximum die_id will be more than maximum package_id. With this change tracking of max_punit_id is not used, so remove storing max_punit_id. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-03-07tools/power/x86/intel-speed-select: Prevent increasing MAX_DIE_PER_PACKAGESrinivas Pandruvada
In the function for_each_online_power_domain_in_set() to pick one CPU from each power domain a three-dimensional array is used, which assumes that a package contains multiple dies, that means the die_id from /sys/devices/system/cpu/cpu0/topology/die_id is only local to package. If it is not unique, still there will be no functional issues in the current generation of products, but the MAX_DIE_PER_PACKAGE will need to be increased for future products with many packages. After kernel version 6.9 die ID is unique system wide not per package. Even if the CPU topology has no dies, the ID will still increment across package. In this case the die_id in package 0 will be 0 and die_id in package 1 will be 1 in a 2-package system. Since the die count must be same for packages, just count the number of dies in package 0 and calculate die index from /sys/devices/system/cpu/cpu0/topology/die_id which is only unique within a package. In this way the array size "int cpus[MAX_PACKAGE_COUNT][MAX_DIE_PER_PACKAGE][MAX_PUNIT_PER_DIE]" doesn't have to increase with increasing package count. No functional change is expected. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-01-03tools/power/x86/intel-speed-select: v1.21 releaseSrinivas Pandruvada
This version has one fix: - Fix restoring TRL after SST-TF disable Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2025-01-03tools/power/x86/intel-speed-select: Fix TRL restore after SST-TF disableSrinivas Pandruvada
When SST-TF is disabled, the TRL (Turbo Ratio Limit) of config level 0 is getting restored. But the TRL of current level should be restored which may not be config level 0. This is caused by a bug in treating config level as TRL level. So arguments needs to be swapped. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2024-07-07tools/power/x86/intel-speed-select: v1.20 releaseSrinivas Pandruvada
This version addresses one issue: - Fix updating TRL MSR after SST-TF is disabled in auto mode. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2024-07-07tools/power/x86/intel-speed-select: Set TRL MSR in 100 MHz unitsSrinivas Pandruvada
When SST-TF is disabled in auto mode, the performance is getting limited. This is caused by wrong programming of Turbo Ratio Limit (TRL) MSR. This MSR always accepts the frequency ratio in 100 MHz unit. When the TPMI is sending TRL in 1 MHz unit, change to 100 MHz, before updating TRL MSR. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2024-04-29tools/power/x86/intel-speed-select: v1.19 releaseSrinivas Pandruvada
This version addresses issues with: - Support of SST BF/TF support per level - Increase number of CPUs displayed - Present all TRL levels for turbo-freq - Fix display for unsupported levels - Support multiple dies - Increase die count - Change CPU display for non compute domain Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Display CPU as None for -1Srinivas Pandruvada
When there is no CPU in a power domain, display "None" instead of -1. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: SST BF/TF support per levelSrinivas Pandruvada
SST BF and TF can be enabled/disabled per level. So check the current level support from the mask of supported levels. This change from a single level to mask for info.sst_tf_support and info.sst_tf_support is indicated by API version change. Use as mask for API version above 2. In this way there is no change in behavior when running on older kernel with API version 2. Since the tool can support now API version 3, update the supported API version. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Increase number of CPUs displayedSrinivas Pandruvada
Currently max 128 CPUs can be displayed in the enable CPU list. Double the range. Since the size is big for stack allocation, change to static. Here changing to static is fine as these functions are called in serial. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Present all TRL levels for turbo-freqSrinivas Pandruvada
For turbo-freq feature, only 3 levels of frequencies are displayed even if platform support more. Present all levels based on the CPU model. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Fix display for unsupported levelsSrinivas Pandruvada
During call to "intel-speed-select turbo-freq info" some junk values are reported for unsupported levels. Initialize the structure fact_info with 0s, so that isst_fact_display_information() will skip "0" values in the frequency. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Support multiple diesSrinivas Pandruvada
When the die id is same as punit compute die ID, treat them same. In this case, when for_each_online_power_domain_in_set() is called, then don't loop for each punit in a die. Just loop for all punits in a package. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-04-29tools/power/x86/intel-speed-select: Increase die countSrinivas Pandruvada
TPMI platform information supports up to 16 compute dies. So increase the range. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-10-17tools/power/x86/intel-speed-select: v1.18 releaseSrinivas Pandruvada
This version addresses issues with: - When CPU 0 hotplug is not possible, try cgroup v2 isolation without any user input - Fix turbo mode enable/disable swapped - Sanitize command line integer and hex arguments - Add more error messages - Increase CPU count in one request Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: Use cgroup isolate for CPU 0Srinivas Pandruvada
From kernel version 6.5, CPU 0 hotplug capability is deprecated. If some SST profile doesn't have CPU 0, then it is no longer possible to offline CPU 0. This means that user space threads will still run on CPU 0. To workaround this issue, use cgroup v2 isolation feature. Whenever there /sys/devices/system/cpu/cpu0/online file is absent or open fails, isolate CPU 0 via CPU cgroup v2 isolation. Also add a command line option to force even if the /sys/devices/system/cpu/cpu0/online is present. The previous commit "01bcb56f059e ("tools/power/x86/intel-speed-select: Prevent CPU 0 offline") was just warning about this issue based on the kernel version 6.5 and above. With this new approach, instead of warning take action to mitigate the issue. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: Increase max CPUs in one requestSrinivas Pandruvada
With the increase in the CPU count, this count needs to be updated. Increase max CPU count to 512. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: Display error for core-power supportSrinivas Pandruvada
When core-power is getting enabled, if the feaure is not supported, display error. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: No TRL for non compute domainsSrinivas Pandruvada
Don't call to set or get TRL for domains in which there are no CPUs. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: turbo-mode enable disable swappedSrinivas Pandruvada
The command for turbo-mode enable and disable is swapped. Fix that. Previously turbo-mode enable was actually disabling and disable was enabling. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: Update help for TRLSrinivas Pandruvada
TRL (turbo ratio limit) argument is passed in hex string. Clarify that in the help. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17tools/power/x86/intel-speed-select: Sanitize integer argumentsSrinivas Pandruvada
If the command takes some integer arguments, make sure the command contains only digits. Same for Hex arguments. Otherwise return error. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-09tools/power/x86/intel-speed-select: v1.17 releaseSrinivas Pandruvada
This version addresses issues with: - CPU count display for power domain != 0 - Support more than 8 sockets - Error on max CPU count exceeds in one request - Prevent trying CPU 0 hotplug for kernel version 6.5 or later - Change mem-frequency display to max-mem-frequency Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-09tools/power/x86/intel-speed-select: Change mem-frequency display nameSrinivas Pandruvada
The mem-frequency displayed by each profile is not the actual memory frequency of DIMMs, but the maximum the CPU can support. Change the mem-frequency field to max-mem-frequency. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-08tools/power/x86/intel-speed-select: Prevent CPU 0 offlineSrinivas Pandruvada
Kernel 6.5 version deprecated CPU 0 hotplug. This will cause all requests to fail to offline CPU 0. Check version number of kernel and ignore CPU 0 hotplug request with debug aid to use cgroup isolation feature for CPU 0. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-08tools/power/x86/intel-speed-select: Error on CPU count exceed in requestSrinivas Pandruvada
There is a limit on number of CPUs in one request. This is set to 256. Currently tool silently ignores request for count over 256. Give an error message to indicate this. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-08tools/power/x86/intel-speed-select: Support more than 8 sockets.Frank Ramsay
MAX_PACKAGE_COUNT limits the intel-speed-select to systems with 8 sockets or fewer. On a system with more than 8 sockets intel-speed-select silently ignores everything beyond the 8th socket, rendering the tool useless for those systems. Increase MAX_PACKAGE_COUNT to support systems with up to 32 sockets. Signed-off-by: Frank Ramsay <frank.ramsay@hpe.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-08-08tools/power/x86/intel-speed-select: Fix CPU count displaySrinivas Pandruvada
Fix CPU count display for power domain != 0. In the function punit_id is always 0, so it never incremented cpu count for power domain id != 0. Update punit_id after call to update_punit_cpu_info() to what is actually received from the kernel. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-06-12tools/power/x86/intel-speed-select: v1.16 releaseSrinivas Pandruvada
This version addresses issues with core power configuration for non CPU dies. Also address issue with JSON formatting of output. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-06-12tools/power/x86/intel-speed-select: Fix json formatting issueSrinivas Pandruvada
Fix two issues related to JSON formatting: 1. intel-speed-select -f json -o cp.out -c 1 core-power assoc -c 1 Intel(R) Speed Select Technology Executing on CPU model:143[0x8f] [root@spr-bkc bin]# cat cp.out | jq . "package-0:die-0:cpu-1" 2. intel-speed-select -f json -o tf.out turbo-freq enable -a Intel(R) Speed Select Technology Executing on CPU model:143[0x8f] [root@spr-bkc bin]# cat tf.out | jq . { "package-0:die-0:cpu-0": { "turbo-freq": { "enable": "success" } }, "package-1:die-0:cpu-48": { "turbo-freq": { "enable": "success" } } } "turbo-freq --auto" parse error: Expected string key before ':' at line 17, column 24 Both of these issues needed proper closing "}" for JSON. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-06-12tools/power/x86/intel-speed-select: Adjust scope of core-power configSrinivas Pandruvada
When core-power configuration or enabled is modified, this is only done for compute dies. But the config must also be set to cores with no CPUs. Without this the configuration is not affective. On displaying config information, allow display for non compute dies also. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Update versionZhang Rui
Update tool and supported API version. This is the first version which supports newer Xeon platforms with TPMI support. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: subject and changelog edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Change TRL display for Emerald RapidsSrinivas Pandruvada
Emerald Rapids doesn't specify TRL (Turbo Ratio Limits) based instruction types. Instead it specifies 5 TRL levels, which can be anyone of the instruction types. Increase TRL levels to 5 for Emerald Rapids. Also change display to show by level number. Show only non zero level values. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Identify Emerald RapidsSrinivas Pandruvada
There are some differences compared to Sapphire Rapids. So, add a separate API. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Display AMX base frequencySrinivas Pandruvada
AMX frequency is present in non TPMI platforms also. When platform supports, the value is non zero. So, display AMX base frequency when non zero, irrespective of platform API version. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Use cgroup v2 isolationSrinivas Pandruvada
On supported systems, it is possiible to isolate CPUs instead of CPU online/offline. This is optional and can be specified using -g option when running as daemon or in combination with -o option for SST-PP level change. CPU isolation doesn't isolate IRQs. So IRQs needs to be moved away from isoolated CPUs. This can be done via IRQ sysfs or irqbalance daemon. The IRQ balance daemon is also capable to parse thermal HFI messages to move IRQs away from CPUS, which are supposed be isolated. But this requires version released after July 2022. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Add missing free cpusetSrinivas Pandruvada
During perf level change cpuset is allocated but not freed. Add free_cpu_set() in success and failure path. Although this is not an issue, as the program will exit after processing of online/offline, but for completeness add the free_cpu_set(). Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Fix clos-max display with TPMI I/FZhang Rui
Comparing clos_config->clos_max with 255 is broken with TPMI I/F because of different isst_get_disp_freq_multiplier() used. Checking for clos_config->clos_max * isst_get_disp_freq_multiplier() instead. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Add cpu id checkZhang Rui
Some operations applies to cpu-power-domain only. Add check for cpu id for these functions. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Avoid setting duplicate tdp levelZhang Rui
If the new TDP level requetsted is same as the current TDP level, don't call into driver to change level. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Remove cpu mask display for non-cpu ↵Zhang Rui
power domain Non CPU power domains will not have any CPUs. So don't display any CPU count or enable mask. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: subject and changelog edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Hide invalid TRL levelZhang Rui
TRL levels with Zero ratio values is meaningless. Prevent these TRL levels from being displayed. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Display fact info for non-cpu power domainZhang Rui
Allow displaying SST-TF info for non-cpu power domain. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-03-22tools/power/x86/intel-speed-select: Show level 0 name for new api_versionZhang Rui
level 0 name is not shown in some case for backward compatibility reason. No need to keep this quirk for new api_version. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>