JIRA: https://issues.redhat.com/browse/RHEL-33321
commit c5120a3356755f9e9d2d592c1347f3b9ff4022a7
Author: Adam Hawley <adam.james.hawley@intel.com>
Date: Wed May 22 16:27:21 2024 +0300
tools/power turbostat: Fix unc freq columns not showing with '-q' or '-l'
Commit 78464d7681f7 ("tools/power turbostat: Add columns for clustered
uncore frequency") introduced 'probe_intel_uncore_frequency_cluster()'
in a way which prevents printing uncore frequency columns if either of
the '-q' or '-l' options are used. Systems which do not have multiple
uncore frequencies per package are unaffected by this regression.
Fix the function so that uncore frequency columns are shown when either
the '-l' or '-q' option is used by checking if 'quiet' is true after
adding counters for the uncore frequency columns.
Fixes: 78464d7681f7 ("tools/power turbostat: Add columns for clustered uncore frequency")
Signed-off-by: Adam Hawley <adam.james.hawley@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
JIRA: https://issues.redhat.com/browse/RHEL-36084
commit ebb5b260af67c677700cd51be6845c2cab3edfbd
Author: David Arcari <darcari@redhat.com>
Date: Mon May 20 14:57:49 2024 -0400
tools/power turbostat: option '-n' is ambiguous
In some cases specifying the '-n' command line argument will cause
turbostat to fail. For instance 'turbostat -n 1' works fine; however,
'turbostat -n 1 -d' will fail. This is the result of the first call
to getopt_long_only() where "MP" is specified as the optstring. This can
be easily fixed by changing the optstring from "MP" to "MPn:" to remove
ambiguity between the arguments.
tools/power turbostat: option '-n' is ambiguous; possibilities: '-num_iterations' '-no-msr' '-no-perf'
Fixes: a0e86c90b83c ("tools/power turbostat: Add --no-perf option")
Signed-off-by: David Arcari <darcari@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 256d218ec6aea99855dc5c54af550fcff96fc732
Author: Len Brown <len.brown@intel.com>
Date: Sat Apr 27 22:15:48 2024 -0400
tools/power turbostat: version 2024.05.10
New since 2024.04.08:
Len Brown (6):
tools/power turbostat: Add "snapshot:" Makefile target
tools/power turbostat: Harden probe_intel_uncore_frequency()
tools/power turbostat: Remember global max_die_id
tools/power turbostat: Survive sparse die_id
tools/power turbostat: Add columns for clustered uncore frequency
tools/power turbostat: version 2024.05.10
Patryk Wlazlyn (7):
tools/power turbostat: Replace _Static_assert with BUILD_BUG_ON
tools/power turbostat: Enable non-privileged users to read sysfs counters
tools/power turbostat: Avoid possible memory corruption due to sparse topology IDs
tools/power turbostat: Read Core-cstates via perf
tools/power turbostat: Read Package-cstates via perf
tools/power turbostat: Fix order of strings in pkg_cstate_limit_strings
tools/power turbostat: Ignore pkg_cstate_limit when it is not available
Zhang Rui (2):
tools/power turbostat: Enhance ARL/LNL support
tools/power turbostat: Add ARL-H support
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 29fea61cd8d4d0e646022c0479aa35381cf1e990
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu May 9 12:39:47 2024 +0200
tools/power turbostat: Ignore pkg_cstate_limit when it is not available
When running in no-msr mode, the pkg_cstate_limit is not populated, thus
we use perf to determine if given pcstate counter is present on the
platform.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 4e7ee02300805d26d9731fd24c4de8e10a43ffea
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu May 9 12:24:02 2024 +0200
tools/power turbostat: Fix order of strings in pkg_cstate_limit_strings
Change the order so that it matches the indexes defined in:
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 0451adf4d46d5df91f888a3d010a4109aa23a7ae
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Wed May 8 15:00:14 2024 +0200
tools/power turbostat: Read Package-cstates via perf
Reading the counters via perf can be done in bulk with a single syscall,
making the counter values more accurate with respect to one another by
minimizing the time gap between individual counter reads.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 1f9e46da9cba54d12880948fd2adac31bb0eaadb
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Mon Mar 11 18:06:16 2024 +0100
tools/power turbostat: Read Core-cstates via perf
Reading the counters via perf can be done in bulk with a single syscall,
making the counter values more accurate with respect to one another by
minimizing the time gap between individual counter reads.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 3559ea813ad3a9627934325c68ad05b18008a077
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Mon May 6 15:39:08 2024 +0200
tools/power turbostat: Avoid possible memory corruption due to sparse topology IDs
Save the highest core and package id when parsing topology to
allocate enough memory when get_rapl_counters() is called with a core or
a package id as a domain.
Note that RAPL domains are per-package on Intel, but per-core on AMD.
Thus, the RAPL code effectively runs in different modes on those two
product lines.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 78464d7681f79bb48995c3d29d7e93d27ba69bca
Author: Len Brown <len.brown@intel.com>
Date: Wed Apr 24 21:12:18 2024 -0400
tools/power turbostat: Add columns for clustered uncore frequency
New machines have multiple uncore frequencies per package,
visible in /sys/devices/system/cpu/intel_uncore_frequency/uncore##/
turbostat now samples these frequencies each measurement interval.
For each package, turbostat now prints "UMHzX.Y" columns,
where X = domain_id, and Y = fabric_cluster_id.
The system summary for each UMHzX.Y column is the average value
for across all of the packages in the system.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 0e39702fbbcdb16ad349439065d24a3bb5e2f331
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu Apr 25 17:54:18 2024 +0200
tools/power turbostat: Enable non-privileged users to read sysfs counters
A group of counters called "sysfs" displays software
C-state request counts and resulting perceived C-state residency.
They are not built-in counters that turbostat knows about ahead of time,
rather they are discovered in sysfs when turbostat starts.
Thus, they are added dynamically, using the same interface
as user-added MSR counters.
When turbostat enters "no-msr" mode, such as when running as a
non-privileged user, it clears all added counters.
Updating that to clear only actual MSR added counters
allows regular users to see the sysfs counters.
[lenb: commit message]
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit f04fcc7ac8ceb87933244cca28759d0fac6103ce
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Mar 27 22:36:38 2024 +0800
tools/power turbostat: Add ARL-H support
Add turbostat support for ARL-H, which behaves the same as ARL.
[lenb: also add ARL-U]
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 196eca020600470ca44da94c65607e7a98aa9d3c
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Mar 27 22:35:03 2024 +0800
tools/power turbostat: Enhance ARL/LNL support
ARL/LNL don't have PC8, other than that, it behaves the same as CNL.
Copy cnl_features for ARL/LNL, except that PC8 support is removed.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit c8b246ea2ea5771f2a0ca6f6a9a520406e6b6eb7
Author: Len Brown <len.brown@intel.com>
Date: Sun Apr 21 12:02:24 2024 -0400
tools/power turbostat: Survive sparse die_id
Turbostat assumed that every package had a die_id = 0.
When this assumption was violated, it exited
when looking for the package uncore frequency:
turbostat: /sys/.../intel_uncore_frequency/package_01_die_00/current_freq_khz: open failed: No such file or directory
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit cda203388687aa075db6f8996c3c4549fa518ea8
Author: Len Brown <len.brown@intel.com>
Date: Sun Apr 21 11:56:48 2024 -0400
tools/power turbostat: Remember global max_die_id
This is necessary to gracefully handle sparse die_id's.
no functional change
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit ae3326ac5742506409a03ce5d69716a8dba4eabc
Author: Len Brown <len.brown@intel.com>
Date: Sun Apr 21 14:45:10 2024 -0400
tools/power turbostat: Harden probe_intel_uncore_frequency()
If sysfs directory "intel_uncore_frequency/cluster00/" exists,
then use uncore cluster code (now its own routine).
The previous check for
"intel_uncore_frequency/package_00_die_00/current_freq_khz",
could be unreliable in the face of sparse die id's.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-33321
commit 231ce08b662a58d4392da998699b3d4a7e2e87cf
Author: Len Brown <len.brown@intel.com>
Date: Sun Apr 21 12:53:53 2024 -0400
tools/power turbostat: Add "snapshot:" Makefile target
Kernel developers often need to diagnose remote customer systems
with the latest turbostat, yet customers are running binary distros
with out-dated turbostat and the customer has no experience
cloning linux kernel trees.
Add a turbostat "snapshot" makefile target to create a standalone
source snapshot from the developer's git tree, appropriately hacked
so that the customer can build turbostat without a kernel tree.
Include the turbostat binary in the snapshot, for convenience in
those situations where the source and destination are trusted,
(and have new enough glibc to execute).
The snapshot is named with the date it was taken rather than
the turbostat VERSION, as it could occur between VERSIONS...
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 5cfac5abb6e23d15669d0621d991d141f4f9b7d4
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Apr 25 17:36:08 2024 -0700
tools/power/x86/intel-speed-select: v1.19 release
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 8ebc39ace34e9b9944e29110598f8343f2d8c159
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri Apr 26 14:39:44 2024 -0700
tools/power/x86/intel-speed-select: Display CPU as None for -1
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 1fcf670e50645f23f026d1dca82e59200115f925
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Mar 26 18:55:53 2024 -0400
tools/power/x86/intel-speed-select: SST BF/TF support per level
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 80a513e3f7fca0493e2760b2bb0526faa33a12cb
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Mon Mar 25 13:39:36 2024 -0700
tools/power/x86/intel-speed-select: Increase number of CPUs displayed
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 38fa152b3de09c01e3488debb903adb0a28580b9
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri Mar 8 18:11:03 2024 -0800
tools/power/x86/intel-speed-select: Present all TRL levels for turbo-freq
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 55d5639bda6563fdfbdf0606c3c23cf5fceacd61
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri Mar 8 16:12:33 2024 -0800
tools/power/x86/intel-speed-select: Fix display for unsupported levels
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit f9264471337e1db69ffc97525bff605b8c7c442f
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Mar 7 15:47:11 2024 -0800
tools/power/x86/intel-speed-select: Support multiple dies
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20031
commit 9ea48bdfd5b19a81edfd9dcc12b8af6bb319c6d8
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Mar 7 15:45:54 2024 -0800
tools/power/x86/intel-speed-select: Increase die count
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>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 3ab7296a7e6aa34634dcc2926af933107a117996
Author: Len Brown <len.brown@intel.com>
Date: Mon Apr 8 19:32:58 2024 -0400
tools/power turbostat: v2024.04.10
Much of turbostat can now run with perf, rather than using the MSR driver
Some of turbostat can now run as a regular non-root user.
Add some new output columns for some new GFX hardware.
[This patch updates the version, but otherwise changes no function;
it touches up some checkpatch issues from previous patches]
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 91a91d389543a86963beec148d98d37875154bd4
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Mar 12 23:56:02 2024 +0800
tools/power/turbostat: Add support for Xe sysfs knobs
Xe graphics driver uses different graphics sysfs knobs including
/sys/class/drm/card0/device/tile0/gt0/gtidle/idle_residency_ms
/sys/class/drm/card0/device/tile0/gt0/freq0/cur_freq
/sys/class/drm/card0/device/tile0/gt0/freq0/act_freq
/sys/class/drm/card0/device/tile0/gt1/gtidle/idle_residency_ms
/sys/class/drm/card0/device/tile0/gt1/freq0/cur_freq
/sys/class/drm/card0/device/tile0/gt1/freq0/act_freq
Plus that,
/sys/class/drm/card0/device/tile0/gt<n>/gtidle/name
returns either gt<n>-rc or gt<n>-mc. rc is for GFX and mc is SA Media.
Enhance turbostat to prefer the Xe sysfs knobs when they are available.
Export gt<n>-rc via BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz.
Export gt<n>-mc via BIC_SMA_mc6/BIC_SMAMHz/BIC_SMAACTMHz.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit dc02dc937a3ef819c5da10e97084af6977be26bf
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Mar 22 09:52:24 2024 +0800
tools/power/turbostat: Add support for new i915 sysfs knobs
On Meteorlake platform, i915 driver supports the traditional graphics
sysfs knobs including
/sys/class/drm/card0/power/rc6_residency_ms
/sys/class/drm/card0/gt_cur_freq_mhz
/sys/class/drm/card0/gt_act_freq_mhz
At the same time, it also supports
/sys/class/drm/card0/gt/gt0/rc6_residency_ms
/sys/class/drm/card0/gt/gt0/rps_cur_freq_mhz
/sys/class/drm/card0/gt/gt0/rps_act_freq_mhz
/sys/class/drm/card0/gt/gt1/rc6_residency_ms
/sys/class/drm/card0/gt/gt1/rps_cur_freq_mhz
/sys/class/drm/card0/gt/gt1/rps_act_freq_mhz
gt0 is for GFX and gt1 is for SA Media.
Enhance turbostat to prefer the i915 new sysfs knobs.
Export gt0 via BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz.
Export gt1 via BIC_SMA_mc6/BIC_SMAMHz/BIC_SMAACTMHz.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 3bbb331c1d34fdd5520a050fce35f71579430485
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Mar 13 10:30:04 2024 +0800
tools/power/turbostat: Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz
Graphics driver (i915/Xe) on mordern platforms splits GFX and SA Media
information via different sysfs knobs.
Existing BIC_GFX_rc6/BIC_GFXMHz/BIC_GFXACTMHz columns can be reused for
GFX.
Introduce BIC_SAM_mc6/BIC_SAMMHz/BIC_SAMACTMHz columns for SA Media.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
JIRA: https://issues.redhat.com/browse/RHEL-29239
commit 60add818ab2543b7e4f2bfeaacf2504743c1eb50
Author: Justin Ernst <justin.ernst@hpe.com>
Date: Tue Apr 2 13:40:29 2024 -0400
tools/power/turbostat: Fix uncore frequency file string
Running turbostat on a 16 socket HPE Scale-up Compute 3200 (SapphireRapids) fails with:
turbostat: /sys/devices/system/cpu/intel_uncore_frequency/package_010_die_00/current_freq_khz: open failed: No such file or directory
We observe the sysfs uncore frequency directories named:
...
package_09_die_00/
package_10_die_00/
package_11_die_00/
...
package_15_die_00/
The culprit is an incorrect sprintf format string "package_0%d_die_0%d" used
with each instance of reading uncore frequency files. uncore-frequency-common.c
creates the sysfs directory with the format "package_%02d_die_%02d". Once the
package value reaches double digits, the formats diverge.
Change each instance of "package_0%d_die_0%d" to "package_%02d_die_%02d".
[lenb: deleted the probe part of this patch, as it was already fixed]
Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit de39d38c06eb047954c5ad20a3f9acb6d3c78498
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Mar 13 10:12:19 2024 +0800
tools/power/turbostat: Unify graphics sysfs snapshots
Graphics sysfs snapshots share similar logic.
Combine them into one function to avoid code duplication.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 4e2bbbf78cf7144204214fd0bd7cca309acd8f89
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Mar 12 14:23:37 2024 +0800
tools/power/turbostat: Cache graphics sysfs path
Graphics drivers (i915/Xe) have different sysfs knobs on different
platforms, and it is possible that different sysfs knobs fit into the
same turbostat columns.
Instead of specifying different sysfs knobs every time, detect them
once and cache the path for future use.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 05a2f07db8883b027c0b4a475fcc586278922b8d
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Tue Mar 5 12:27:27 2024 +0100
tools/power turbostat: read RAPL counters via perf
Some of the future Intel platforms will require reading the RAPL
counters via perf and not MSR. On current platforms we can still read
them using both ways.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 4a1bb4dad5d16669e841410944e7bc84ef7263fc
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu Mar 14 11:36:55 2024 +0100
tools/power turbostat: Clear added counters when in no-msr mode
If user request --no-msr or is not able to access the MSRs,
turbostat should clear all the counters added with --add.
Because MSR access permission checks are done after the cmdline is
parsed, the decision has to be defered up until the transition into
no-msr mode happen.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit aed48c48fa65abdd584e14f7d0273711bc10d223
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Tue Jan 30 23:57:07 2024 +0100
tools/power turbostat: add early exits for permission checks
Checking early if the permissions are even needed gets rid of the
warnings about some of them missing. Earlier we issued a warning in case
of missing MSR and/or perf permissions, even when user never asked for
counters that require those.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 5088741ec805cd249e27c7176ed09bdab164960e
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Mon Jan 15 19:04:21 2024 +0100
tools/power turbostat: detect and disable unavailable BICs at runtime
To allow unprivileged user to run turbostat seamlessly.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit e48934c9f1048ed4640b60321baf1986d1a470e1
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu Jan 11 16:42:22 2024 +0100
tools/power turbostat: Add reading aperf and mperf via perf API
By using the perf API we spend less time in between the reads of the
counters, resulting in more accurate calculations of the dependent
metrics.
Using perf API is also usually faster overall, although cache miss, if
we get one, is more costly when using perf vs MSR driver.
We would fallback to the msr reads if the sysfs isn't there or when in
--no-perf mode.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit a0e86c90b83c118985260e36490583b5a38d4359
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu Jan 11 15:58:02 2024 +0100
tools/power turbostat: Add --no-perf option
Add the --no-perf option to allow users to run turbostat without
accessing perf.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 3e4048466c396cff52c6d435156dbcd0571e4381
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Thu Jan 11 15:48:09 2024 +0100
tools/power turbostat: Add --no-msr option
Add --no-msr option to allow users to run turbostat without
accessing MSRs via the MSR driver.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 2d2ccd57338779469777d4319152151272994182
Author: Len Brown <len.brown@intel.com>
Date: Mon Feb 5 15:56:25 2024 -0600
tools/power turbostat: enhance -D (debug counter dump) output
Eliminate redundant debug output for core and package scope counters.
Include name and path for all "ADDED" counters.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit b6fe938317eed58e8c687bd5965a956e15fb5828
Author: Len Brown <len.brown@intel.com>
Date: Fri Jan 19 12:25:42 2024 -0600
tools/power turbostat: Fix warning upon failed /dev/cpu_dma_latency read
Previously a failed read of /dev/cpu_dma_latency erroneously complained
turbostat: capget(CAP_SYS_ADMIN) failed, try "# setcap cap_sys_admin=ep ./turbostat
This went unnoticed because this file is typically visible to root,
and turbostat was typically run as root.
Going forward, when a non-root user can run turbostat...
Complain about failed read access to this file only if --debug is used.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 538d505fde20393bce1e6fb95cec82b56cdd22ef
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Mon Jan 22 15:22:35 2024 +0100
tools/power turbostat: Read base_hz and bclk from CPUID.16H if available
If MSRs cannot be read, values can be obtained from cpuid.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit fb5ceca046efc84f69fcf9779a013f8a0e63bbff
Author: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Date: Fri Jan 12 13:48:14 2024 +0100
tools/power turbostat: Print ucode revision only if valid
If the MSR read were to fail, turbostat would print "microcode 0x0"
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
JIRA: https://issues.redhat.com/browse/RHEL-29239
commit bb6181fa6bc942aac3f7f2fa8e3831952a2ef118
Author: Len Brown <len.brown@intel.com>
Date: Wed Dec 20 13:11:05 2023 -0500
tools/power turbostat: Expand probe_intel_uncore_frequency()
Print current frequency along with the current (and initial) limits
Probe and print uncore config also for machines using the new cluster API
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 227ed18f456a68bbb69807294a9089208663a6d3
Author: Chen Yu <yu.c.chen@intel.com>
Date: Sun Oct 22 13:52:21 2023 +0800
tools/power turbostat: Do not print negative LPI residency
turbostat prints the abnormal SYS%LPI across suspend-to-idle:
SYS%LPI = 114479815993277.50
This is reproduced by:
Run a freeze cycle, e.g. "sleepgraph -m freeze -rtcwake 15".
Then do a reboot. After boot up, launch the suspend-idle-idle
and check the SYS%LPI field.
The slp_so residence counter is in LPIT table, and BIOS does not
clears this register across reset. The PMC expects the OS to calculate
the LPI residency based on the delta. However, there is an firmware
issue that the LPIT gets cleared to 0 during the second suspend
to idle after the reboot, which brings negative delta value.
[lenb: updated to print "neg" upon this BIOS failure]
Reported-by: Todd Brandt <todd.e.brandt@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 0b13410b52c4636aacb6964a4253a797c0fa0d16
Author: Peng Liu <liupeng17@lenovo.com>
Date: Sat Oct 7 13:46:22 2023 +0800
tools/power turbostat: Fix Bzy_MHz documentation typo
The code calculates Bzy_MHz by multiplying TSC_delta * APERF_delta/MPERF_delta
The man page erroneously showed that TSC_delta was divided.
Signed-off-by: Peng Liu <liupeng17@lenovo.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-34610
commit 3ac1d14d0583a2de75d49a5234d767e2590384dd
Author: Wyes Karny <wyes.karny@amd.com>
Date: Tue Oct 3 05:07:51 2023 +0000
tools/power turbostat: Increase the limit for fd opened
When running turbostat, a system with 512 cpus reaches the limit for
maximum number of file descriptors that can be opened. To solve this
problem, the limit is raised to 2^15, which is a large enough number.
Below data is collected from AMD server systems while running turbostat:
|-----------+-------------------------------|
| # of cpus | # of opened fds for turbostat |
|-----------+-------------------------------|
| 128 | 260 |
|-----------+-------------------------------|
| 192 | 388 |
|-----------+-------------------------------|
| 512 | 1028 |
|-----------+-------------------------------|
So, the new max limit would be sufficient up to 2^14 cpus (but this
also depends on how many counters are enabled).
Reviewed-by: Doug Smythies <dsmythies@telus.net>
Tested-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-26871
commit 612c29328466bdc1454ce76959fc03a1e2f7087a
Author: Bob Moore <robert.moore@intel.com>
Date: Thu, 06 Apr 2023 20:29:11 +0000
ACPICA commit 25bddd1824b1e450829468a64bbdcb38074ba3d2
Copyright updates to 2023.
Link: https://github.com/acpica/acpica/commit/25bddd18
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit b8337e6a780dad9505f9d44da07c0a5c52fa0a04
Author: Len Brown <len.brown@intel.com>
Date: Tue Nov 7 23:28:30 2023 -0500
tools/power turbostat: version 2023.11.07
Turbostat features are now table-driven (Rui Zhang)
Add support for some new platforms (Sumeet Pawnikar, Rui Zhang)
Gracefully run in configs when CPUs are limited (Rui Zhang, Srinivas Pandruvada)
misc minor fixes.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit f2c1dba31133233697fc96e808c6005fc304a8e9
Author: Len Brown <len.brown@intel.com>
Date: Wed Jun 28 09:40:53 2023 -0400
tools/power/turbostat: bugfix "--show IPC"
turbostat --show IPC
displays "inf" for the IPC column
turbostat was missing the explicit dependency of IPC on APERF,
and thus neglected to collect APERF when only IPC was requested.
typcial use:
turbostat --quiet --show CPU,IPC
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 956dbd3de400a5665faf08a8588556db9c1bb56e
Author: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Date: Tue May 23 17:46:45 2023 +0530
tools/power/turbostat: Add initial support for LunarLake
Add initial support for LunarLake platform.
It shares the same features with CannonLake.
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 7b57e7b683e3872b02117f46bd7dc7ad765888a8
Author: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Date: Tue May 23 17:46:45 2023 +0530
tools/power/turbostat: Add initial support for ArrowLake
Add initial support for ArrowLake platform.
It shares the same features with CannonLake.
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 5a6efcb9102af4210d5a59182dbfbc594ae50fd4
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Oct 19 11:00:07 2023 +0800
tools/power/turbostat: Add initial support for GrandRidge
Add initial support for GrandRidge.
It shares the same features as SierraForest, except that it does not
support PC2/PC6.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20037
commit d33605f367414c7e0009978d1fbe9af01a36e221
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Sep 28 13:09:02 2023 +0800
tools/power/turbostat: Add initial support for SierraForest
Add initial support for SierraForest.
It shares the same features with SapphireRapids, except that it has
MSR_MODULE_C6_RES_MS support.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 5feab4a6b8a730438a0fe8758dfa0700f951edde
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Sep 9 13:28:07 2023 +0800
tools/power/turbostat: Add initial support for GraniteRapids
Add initial support for GraniteRapids.
It shares the same features with SapphireRapids.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 0e3f10e6aa97b0134b526ec9cdc3ccdac2239b43
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Oct 19 11:04:33 2023 +0800
tools/power/turbostat: Add MSR_CORE_C1_RES support for spr_features
Add MSR_CORE_C1_RES support for spr_features because both Sapphirerapids
and Emeraldrapids support this MSR.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 37f68a2940558b4f6f8e51b7b1d00f084b4bdde2
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Jan 24 10:39:53 2023 -0800
tools/power/turbostat: Move process to root cgroup
When available CPUs are reduced via cgroup cpuset controller, turbostat
will exit with errors (For example):
get_counters: Could not migrate to CPU 0
turbostat: re-initialized with num_cpus 20
get_counters: Could not migrate to CPU 0
turbostat: re-initialized with num_cpus 20
Move the turbostat to root cgroup, which has every CPU.
Writing the value 0 to a cgroup.procs file causes the writing
process to be moved to the corresponding cgroup.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit f638858da0925b29122f05135663013dc240eaf9
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 20 09:39:22 2023 +0800
tools/power/turbostat: Handle cgroup v2 cpu limitation
CPUs can be isolated via cgroup settings and turbostat should avoid
migrating to these CPUs, just like it does for the '-c' cpus.
Introduce cpu_effective_set to save the cgroup cpu limitation info from
/sys/fs/cgroup/cpuset.cpus.effective. And use cpu_allowed_set as the
intersection of cpu_present_set, cpu_effective_set and cpu_subset.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 8c3dd2c9e54273922ea71b2a4c0e77fc624c396b
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 20 09:45:21 2023 +0800
tools/power/turbostat: Abstrct function for parsing cpu string
Abstract parse_cpu_str() which can update any specified cpu_set by a
given cpu string. This can be used to handle further CPU limitations
from other sources like cgroup.
The cpu string parsing code is also enhanced to handle the strings that
have an extra '\n' before string terminator.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit c25ef0e5d9d7d5fb9e1679286fc7a11e70f16c70
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 20 14:20:47 2023 +0800
tools/power/turbostat: Handle offlined CPUs in cpu_subset
It is possible that the cpu_subset contains offlined CPUs.
If this happens during start, exit immediately because this is likely an
operator error that is best fixed by re-invoking.
If this happens at runtime, give a warning only because turbostat should
do its best effort to continue running.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 0fe3752901370b83b63d4ddbce708b23c8e41ea9
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 6 18:35:26 2023 +0800
tools/power/turbostat: Obey allowed CPUs for system summary
System summary should summarize the information for allowed CPUs instead
of all the present CPUs.
Introduce topology information for allowed CPUs, and use them to
get system summary.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit ccf8a0528061b4ca5f5c0e73c8d888e7e6d8b054
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 6 09:59:14 2023 +0800
tools/power/turbostat: Obey allowed CPUs for primary thread/core detection
Thread_id doesn't tell if a CPU is allowed or not.
Detect allowed CPUs only and use the first detected thread/core as the
primary thread/core of a core/package.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 74318add132365db3026e281ac06836a26cda857
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Oct 4 15:13:23 2023 +0800
tools/power/turbostat: Abstract several functions
When detecting the primary thread/core in a core/package, current code
doesn't handle the allowed CPUs.
Abstract several functions for further fix of this issue.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 7bb3fe27ad4f62039b2ac80a2147452a608b474f
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Oct 4 14:25:25 2023 +0800
tools/power/turbostat: Obey allowed CPUs during startup
Set turbostat CPU affinity to make sure turbostat is running on one of
the allowed CPUs.
Set base_cpu to the first allowed CPU so that some platform information
is dumped using one of the allowed CPUs.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 4ede6d1ce7acba9cafe7df4e935b174623cd2181
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Oct 4 13:52:02 2023 +0800
tools/power/turbostat: Obey allowed CPUs when accessing CPU counters
for_all_cpus/for_all_cpus_2 are used for accessing the per CPU counters,
and they should follow the cpu_allowed_set instead of cpu_present_set.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 71cfd1da9f0635ccd7124ad8b67b9aed596be491
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Oct 6 11:01:17 2023 +0800
tools/power/turbostat: Introduce cpu_allowed_set
Turbostat supports "-c" parameter which limits output to system summary
plus the specified cpu-set. But some code still uses cpu_present_set to
read and dump the counters.
Introduce cpu_allowed_set for code that should obey the specified cpu-set.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6b74a30b767e362eda7deeac52edcd546c5f6d8f
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Sep 9 13:26:51 2023 +0800
tools/power/turbostat: Remove PC7/PC9 support on ADL/RPL
Compared with other platforms that share cnl_features, ADL/RPL don't
have PC7/PC9.
Clone a new platform feature set from cnl_features for ADL/RPL, with
PC7/PC9 removed.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 05ad96ff0fb9d1b16abb5022b9c62636c6780fc2
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 15:33:27 2023 +0800
tools/power/turbostat: Enable MSR_CORE_C1_RES on recent Intel client platforms
All recent Intel client platforms have MSR_CORE_C1_RES. Enable the
support on these platforms, including CNL/ICL/LKF/RKL/TGL/ADL/RPL/MTL.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 7ee39d8d593e3d28eced0fa1a8c8c6bdcbd4156e
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Sep 13 23:32:39 2023 +0800
tools/power/turbostat: Introduce probe_pm_features()
Feature probe has nothing to do with CPUID, thus it should not be in
process_cpuids().
Introduce probe_pm_features() and move all feature probing functions
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 5612b2c89bd0a3a2f7c9e8756e6ead971b03f8a3
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Aug 30 16:54:51 2023 +0800
tools/power/turbostat: Relocate more probing related code
Relocate more feature probing code outside of process_cpuids() into the
corresponding probing functions.
This improves the readability of code and the turbostat output.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit ce7a32c2a4cdba06ed5ead4ed8f980c893e20cd2
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Aug 30 16:36:06 2023 +0800
tools/power/turbostat: Reorder some functions
Reorder some functions to solve code depdency introduced by next patch.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit db735f8ba78bf7692579b78f0ca1e40563ef79fd
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 16:02:16 2023 +0800
tools/power/turbostat: Relocate thermal probing code
Introduce probe_thermal(), and move all thermal probing related code
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit e7d7b82de192464b733fb2bcc9e305ea6f6ea47e
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 16:01:36 2023 +0800
tools/power/turbostat: Relocate lpi probing code
Introduce probe_lpi(), and move all lpi probing related code into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 2538d1673d02f66f6bdf01eebf36e271228778e9
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 16:01:12 2023 +0800
tools/power/turbostat: Relocate graphics probing code
Introduce probe_graphics(), and move all graphics probing related code
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6cb13609a07ba466b4613fdce7da8c98508069b7
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 16:00:33 2023 +0800
tools/power/turbostat: Rename rapl probing function
Rename rapl_probe() to probe_rapl() to be consistent with other probing
function names.
Probe rapl after probing uncore frequency.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 622c8f23556266a5afdd657aa0518b7d70d5dfc7
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 16:00:15 2023 +0800
tools/power/turbostat: Rename uncore probing function
Rename intel_uncore_frequency_probe() to probe_intel_uncore_frequency()
to be consistent with other probing function names.
Probe uncore frequency right after probing cstates.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 11cd9a09f3e827605cf8fc7c343ddb8c9f4ee95d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 15:58:10 2023 +0800
tools/power/turbostat: Relocate pstate probing code
Introduce probe_pstates() and move all pstate probing related code into
it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 045acf6064c5567011163e97c28906e0a7791414
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Aug 29 13:47:58 2023 +0800
tools/power/turbostat: Relocate cstate probing code
Move all cstate probing related code into probe_cstates().
Note that dump_platform_info() actually dumps both MSR_PLATFORM_INFO and
MSR_IA32_POWER_CTL. MSR_PLATFORM_INFO is for pstate and
MSR_IA32_POWER_CTL is for cstate. So split dump_platform_info() and dump
MSR_IA32_POWER_CTL in probe_cstates().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 32e8c6169af7ef7c938b1bd996d27ab171e27d80
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 14:44:06 2023 +0800
tools/power/turbostat: Improve probe_platform_features() logic
AMD/Hygon platforms that don't have RAPL use 'amd_features' to describe
the platform features. Unknown Intel platforms use 'default_features' to
describe the platform features.
As none of the platform feature is set for 'amd_features' or
'default_features', there is no need to maintain both of them.
Remove 'amd_features' structure and improve the logic in
probe_platform_features().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit d085b3b0f11af7d23601b832e0d9e446d18df968
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 21:53:21 2023 +0800
tools/power/turbostat: Delete intel_model_duplicates()
Now CPU model checks have been cleaned up, no code depends on the
duplicated CPU model value.
Delete intel_model_duplicates().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 7d0ebe6f7eaf8c0ac069ddab1fe3793401139fb3
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 15:57:44 2023 +0800
tools/power/turbostat: Abstract cstate prewake bit support
Abstract cstate prewake bit support.
Delete is_icx()/is_spr() CPU model checks.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 58ddb691d8d8a281535406766da4e23e0f011126
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 15:07:43 2023 +0800
tools/power/turbostat: Abstract extended cstate MSRs support
Abstract the support for MSR_PKG_WEIGHTED_CORE_C0_RES,
MSR_PKG_ANY_CORE_C0_RES, MSR_PKG_ANY_GFXE_C0_RES and
MSR_PKG_BOTH_CORE_GFXE_C0_RES.
Delete has_skl_msrs() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 80d132cb45f2cc171395bfaacd74567a183ab160
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 15:00:58 2023 +0800
tools/power/turbostat: Abstract MSR_KNL_CORE_C6_RESIDENCY support
Abstract the support for MSR_KNL_CORE_C6_RESIDENCY.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit c8202a6c3acf7bbde42b5e389eec40fd8e1b8358
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 15:26:14 2023 +0800
tools/power/turbostat: Abstract MSR_ATOM_PKG_C6_RESIDENCY support
Abstract the support for MSR_ATOM_PKG_C6_RESIDENCY.
Delete is_slm() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6c36882e09dbc9a44d64180ba7972838d3f45488
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:52:24 2023 +0800
tools/power/turbostat: Abstract MSR_CC6/MC6_DEMOTION_POLICY_CONFIG support
Abstract the support for MSR_CC6/MC6_DEMOTION_POLICY_CONFIG.
Delete has_slv_msrs() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 76d83d2ae8e3099d9a6bd67fba918108824d7d4d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:41:30 2023 +0800
tools/power/turbostat: Abstract MSR_CORE_C1_RES support
Abstract the support for MSR_CORE_C1_RES.
Delete is_dnv() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 148df4fd04a98fb24198ecb4419c87e07d38af30
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Sep 8 23:18:51 2023 +0800
tools/power/turbostat: Abstract IRTL support
Abstract the support for MSR_PKGC3/PKGC6/PKGC7/PKGC8/PKGC9/PKGC10_IRTL.
Delete has_snb_msrs() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 8c382f9e74663072805565036026d4e79de96425
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:27:26 2023 +0800
tools/power/turbostat: Use fine grained IRTL output
It is pointless to dump the IRTL register for a package cstate that is
not supported by the platform.
Print IRTL only for states that are available in
platform->supported_cstates.
Delete has_c8910_msrs() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit cd7a2b6a61100a0fe8a40916d1afbd72d8833d57
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:24:19 2023 +0800
tools/power/turbostat: Adjust cstate for is_slm()/is_knl()/is_cnl()/is_ehl() models
Disable CC3 for is_slm()/is_knl()/is_cnl()/is_ehl() models.
Delete is_cnl()/is_ehl() CPU model checks.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 1109694817fb4fcdfccb1a86fd58e69fb60f4eab
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:16:52 2023 +0800
tools/power/turbostat: Adjust cstate for is_bdx() models
Disable CC7/PC7 for is_bdx() models.
Delete is_bdx() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 3d982ac0dafeab860b9d42f5cc41a78753275fdd
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 14:09:20 2023 +0800
tools/power/turbostat: Adjust cstate for is_jvl() models
Disable CC3/CC7/PC2/PC3/PC6/PC7 for is_jvl() models.
Delete is_jvl() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6f1935c036f79b56b6a1dc6e51c8c6fe483983ec
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Sep 8 23:17:23 2023 +0800
tools/power/turbostat: Adjust cstate for models with .cst_limit set
Enable PC3/PC6 for platforms with .cst_limit set because package cstates
are guarded by pkg_cstate_limit.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 3c6a17b8ae44b0116e303402803c173fe2a3da92
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 22:37:37 2023 +0800
tools/power/turbostat: Add skeleton support for cstate enumeration
Add skeleton support for cstate enumeration.
Note that the previous logic may override the cstate setting for
multiple times for different reasons. The conversion to new cstate
enumeration must be done step by step following the previous code
order strictly.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 485a017c45200ed82518f6cdeea554f77e9a0562
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 10:37:23 2023 +0800
tools/power/turbostat: Abstract TSC tweak support
On some models, the CPU base frequency is different from the TSC
frequency, and the aperf/mperf counters are running at CPU base
frequency instead of TSC frequency.
Abstract support for TSC tweak.
Given that tsc_tweak depends on base_hz, move the code to probe_bclk()
after base_hz is available.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit bf1ad57c3f92c551dbfdcecd49797253f55cb7c1
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 10:28:04 2023 +0800
tools/power/turbostat: Remove unused family/model parameters for RAPL functions
RAPL probing can be done without family/model checking. Remove these
parameters in rapl probe functions.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 7c60409382a4be05d601e0b45db7b0166845b0cf
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 10:21:10 2023 +0800
tools/power/turbostat: Abstract hardcoded TDP value
Different hardcoded TDP values are used when TDP can not be retrieved
from the hardware.
Abstract hardcoded TDP value.
Delete CPU model checks in get_tdp_intel().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 9e6f35159cdef148c711d2fb7d5fd2b2b6fb772d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Apr 22 12:21:58 2023 +0800
tools/power/turbostat: Abstract fixed DRAM Energy unit support
Abstract the support for fixed Dram domain energy unit.
Delete rapl_dram_energy_units_probe() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6d35b8c4a661c849361239fe316035ea952606a3
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Apr 22 11:59:04 2023 +0800
tools/power/turbostat: Abstract RAPL divisor support
INTEL_FAM6_ATOM_SILVERMONT model needs a divisor to convert the raw
Energy Units value from MSR_RAPL_POWER_UNIT.
Abstract the support for RAPL divisor.
Delete CPU model check in rapl_probe_intel().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit e338831b14d2da921348c8c4055b9f2c94effe73
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 21:37:46 2023 +0800
tools/power/turbostat: Abstract Per Core RAPL support
Abstract the support for Per Core RAPL.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 86ba263d9b72b7766a99059e9b3bd104d089b7fa
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Aug 28 15:09:40 2023 +0800
tools/power/turbostat: Abstract RAPL MSRs support
Abstract the support for RAPL MSRs.
Delete CPU model checks in rapl_probe_intel().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit a98f886035d5f7e0ec66036dd6bf98b40e75b692
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Aug 26 14:57:12 2023 +0800
tools/power/turbostat: Simplify the logic for RAPL enumeration
The support for each RAPL domains, as well as the support for the perf
status of each RAPL domains, can be detected by checking the
availabilities of the corresponding RAPL MSRs.
Change the code accordingly and remove the hardcoded logic for each
model.
Note that this also fixes the INTEL_FAM6_ATOM_TREMONT model, which has
RAPL_PKG_PERF_STATUS and MSR_DRAM_PERF_STATUS but doesn't have BIC_PKG__
and BIC_RAM__ set.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit b9cd66833d3a651cea10666674e9abcf2182e8ad
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Aug 26 14:38:38 2023 +0800
tools/power/turbostat: Redefine RAPL macros
Redefine RAPL macros to make the code more readable.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit a5d1ab93a0993616efbf61378e491d6673f4684d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Apr 22 11:39:49 2023 +0800
tools/power/turbostat: Abstract hardcoded Crystal Clock frequency
Abstract the support for hardcoded Crystal Clock frequency, which is
used when crystal clock is not available from CPUID.15.
Delete CPU model checks in process_cpuid().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit d90120bf9f111bec8ba0b8ef86c46ccbcd9df188
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Apr 22 11:29:18 2023 +0800
tools/power/turbostat: Abstract Automatic Cstate Conversion support
Abstract the support for AUTOMATIC_CSTATE_CONVERSION bit in
MSR_PKG_CST_CONFIG_CONTROL.
Delete automatic_cstate_conversion_probe() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 0c057cf7a0e163bf9631b83c002b3a55691674c7
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Jul 30 14:25:17 2023 +0800
tools/power/turbostat: Abstract Perf Limit Reasons MSRs support
Abstract the support for MSR_CORE/GFX/RING_PERF_LIMIT_REASONS MSRs.
Delete perf_limit_reasons_probe() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit d8e1623baa0b49aa90cf5801cfaac9e3d3aa1e19
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Aug 25 23:04:44 2023 +0800
tools/power/turbostat: Abstract TCC Offset bits support
Abstract the support for different TCC Offset bits in
MSR_IA32_TEMPERATURE_TARGET.
Delete check_tcc_offset() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit a61c9cb478c0bf31a50d1829834e822e92876c95
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 31 14:19:46 2023 +0800
tools/power/turbostat: Abstract Config TDP MSRs support
Abstract the support for MSR_CONFIG_TDP_NOMINAL/LEVEL_1/LEVEL_2/CONTROL
and MSR_TURBO_ACTIVATION_RATIO.
Delete has_config_tdp() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit a3943deaf98f713c819dd7e67af734d4ed4da030
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Jul 30 13:54:25 2023 +0800
tools/power/turbostat: Rename some TRL functions
Rename dump_hsw_turbo_ratio_limits() and dump_ivt_turbo_ratio_limits()
to dump_turbo_ratio_limit2() and dump_turbo_ratio_limit1() because they
dump MSR_TURBO_RATIO_LIMIT1/LIMIT2, and the MSRs' behavior is
consistent when they are available.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 10d85d85ab4f3ae7faca4450ce7b0a166fd396f0
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Sep 8 23:16:00 2023 +0800
tools/power/turbostat: Abstract Turbo Ratio Limit MSRs support
Abstract the support for MSR_TURBO_RATIO_LIMIT, MSR_TRUBO_RATIO_LIMIT1,
MSR_TURBO_RATIO_LIMIT2, MSR_SECONDARY_TURBO_RATIO_LIMIT,
MSR_ATOM_CORE_RATIOS and MSR_ATOM_CORE_TURBO_RATIOS.
Delete has_turbo_ratio_group_limits(), has_turbo_ratio_limit(),
has_atom_turbo_ratio_limit(), has_ivt_turbo_ratio_limit(),
has_hsw_turbo_ratio_limit(), has_knl_turbo_ratio_limit() and
has_glm_turbo_ratio_limit() CPU model checks.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 8b7199c0855e3b22532a21aaaed78e699431e4e5
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Mar 27 14:58:35 2023 +0800
tools/power/turbostat: Rename some functions
Rename dump_nhm_platform_info() and dump_nhm_cst_cfg() to
dump_platform_info() and dump_cst_cfg() because these MSRs' behavior is
consistent when they're available.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit c2c25e85df316a624e4a8ee85d65ea29265f486d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Mar 27 14:57:06 2023 +0800
tools/power/turbostat: Remove a redundant check
Platforms with has_msr_misc_pwr_mgmt set is a subset of platforms with
has_nhm_msrs set.
Thus remove the redudant check for platform->has_nhm_msrs.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit fcfa1ce074ab76272639961d4d7900b91657a8d5
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Aug 25 16:52:23 2023 +0800
tools/power/turbostat: Abstract Nehalem MSRs support
MSR_PLATFORM_INFO, MSR_IA32_TEMPERATURE_TARGET, MSR_SMI_COUNT,
MSR_PKG_CST_CONFIG_CONTROL, and the TRL MSRs are always available for
platforms since Nehalem. Support for these msrs can be described
altogether.
Abstract the support for these MSRs.
Delete probe_nhm_msrs() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 3989fc890782c8002477895e9f24ffb98a132293
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 22:37:06 2023 +0800
tools/power/turbostat: Abstract Package cstate limit decoding support
Abstract the support for decoding package cstate limit from
MSR_PKG_CST_CONFIG_CONTROL.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 71e841293c715797d8c6ae8cdc3f74b4396c5570
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Aug 21 22:22:48 2023 +0800
tools/power/turbostat: Abstract BCLK frequency support
Abstract CPU base clock frequency support.
Note that bclk is used by
1. calculate base_hz using MSR_PLATFORM_INFO, which is guarded by
probe_nhm_msrs().
2. dump MSR_PLATFORM_INFO and Turbo Ratio Limit MSRs, which are also
guarded by probe_nhm_msrs().
Thus probe_bclk() works for probe_nhm_msrs() models only.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 45232ab168a3c5abad86eafaef2beed8d7037666
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 27 21:52:53 2023 +0800
tools/power/turbostat: Add skeleton support for table driven feature enumeration
Turbostat supports a series of features that may diverge among different
CPU models.
Current code uses various of CPU model checks in different places to
handle this, which makes the code hard to maintain.
Add skeleton support for table driven feature enumeration to replace the
current error-prone CPU model checks and global variables.
Note: by comparing the CPU models with intel-family.h, it is found that
turbostat support for below four Models are missing, including
INTEL_FAM6_ICELAKE, INTEL_FAM6_ATOM_SILVERMONT_MID,
INTEL_FAM6_ATOM_AIRMONT_MID and INTEL_FAM6_ATOM_AIRMONT_NP. Adding
support for these models is a different work, thus it is not covered in
this patch set.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 48674c1bb6124fe392e8fed80a39fcb3f62e6551
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Mar 27 12:36:55 2023 +0800
tools/power/turbostat: Remove pseudo check for two models
INTEL_FAM6_ATOM_SILVERMONT_MID/INTEL_FAM6_ATOM_AIRMONT_MID are not
listed in probe_nhm_msrs(). This means that most of the turbostat
features are not available on these two platforms.
Further more, checking for these two models in has_slv_msrs() is
dead code. Because has_slv_msrs() is called by the code guarded by
probe_nhm_msrs().
For these two reasons, remove pseudo check for
INTEL_FAM6_ATOM_SILVERMONT_MID and INTEL_FAM6_ATOM_AIRMONT_MID.
Will add back the support when we can access these two platforms.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 6d306d6ec7e0f9a5e90f5afd70e3b6c32ae50ce6
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Mar 24 16:26:25 2023 +0800
tools/power/turbostat: Replace raw value cpu model with Macro
Kernel already has
#define INTEL_FAM6_NEHALEM_G 0x1F /* Auburndale / Havendale */
Use standard Macro for CPU Model instead of raw value.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 2c019d657968bdd93e11615e0919d8181a54742d
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sun Aug 21 22:39:16 2022 +0800
tools/power/turbostat: Support alternative graphics sysfs knobs
/sys/class/graphics/fb0/device/drm/card0/ and /sys/class/drm/card0/
point to the same device node.
But in some cases, one exists and the other one does not.
Prefer to use /sys/class/drm/card0/, and fall back to
/sys/class/graphics/fb0/device/drm/card0/.
This recovers the "GFXMHz" and "GFXAMHz" columns on some platforms like
a SPR server.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit b98a6d78768ec459d394db8bc086d071eb6556c8
Author: Zhang Rui <rui.zhang@intel.com>
Date: Fri Mar 24 16:30:55 2023 +0800
tools/power/turbostat: Enable TCC Offset on more models
All Models that duplicate INTEL_FAM6_CANNONLAKE_L support TCC Offset.
Enable this feature on all these models.
Delete obsolete model_orig.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit b61b7d8c4c22c4298a50ae5d0ee88facb85ce665
Author: Chen Yu <yu.c.chen@intel.com>
Date: Mon Mar 27 11:17:44 2023 +0800
tools/power/turbostat: Enable the C-state Pre-wake printing
Currently the C-state Pre-wake will not be printed due to the
probe has not been invoked. Invoke the probe function accordingly.
Fixes: aeb01e6d71 ("tools/power turbostat: Print the C-state Pre-wake settings")
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 137f01b3529d292a68d22e9681e2f903c768f790
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Mar 25 21:57:07 2023 +0800
tools/power/turbostat: Fix a knl bug
MSR_KNL_CORE_C6_RESIDENCY should be evaluated only if
1. this is KNL platform
AND
2. need to get C6 residency or need to calculate C1 residency
Fix the broken logic introduced by commit 1e9042b9c8 ("tools/power
turbostat: Fix CPU%C1 display value").
Fixes: 1e9042b9c8 ("tools/power turbostat: Fix CPU%C1 display value")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-20029
commit 4d1827485acecac0016eaaec199e97697afdaa84
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Jul 31 14:02:11 2023 +0800
tools/power/turbostat: Fix failure with new uncore sysfs
On some platforms, turbostat fails during launch time like below,
turbostat version 2023.03.17 - Len Brown <lenb@kernel.org>
...
cpu40: MSR_IA32_PACKAGE_THERM_STATUS: 0x884c0000 (24 C)
cpu40: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
turbostat: snapshot_sysfs_counter(/sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00/current_freq_khz): No data available
This is because new uncore sysfs is used on these platforms as
introduced by commit 9b8dea80e3cb ("platform/x86/intel-uncore-freq:
Support for cluster level controls").
With the new uncore sysfs interface,
/sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00/current_freq_khz
is still available, but reading it fails.
How to support the fabric cluster level uncore sysfs is not settled yet,
as a short term fix, clear the BIC_UNCORE_MHZ bit when new sysfs I/F is
detected.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit a590ed62269a049a72484ce617fe2f34e2da66cf
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri Oct 13 11:15:41 2023 -0700
tools/power/x86/intel-speed-select: v1.18 release
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>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit 3bc0f20a8c59daa79aee2da119564f668f458afd
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Oct 3 14:46:30 2023 -0700
tools/power/x86/intel-speed-select: Use cgroup isolate for CPU 0
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>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit bc5370cca03ba9d1634fecd85e0cf99a0a3c0483
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri Oct 13 11:20:56 2023 -0700
tools/power/x86/intel-speed-select: Increase max CPUs in one request
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>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit da4c1b9e8f22d0567e308428e588e1f9e004ce74
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Sep 7 17:07:19 2023 -0700
tools/power/x86/intel-speed-select: Display error for core-power support
When core-power is getting enabled, if the feaure is not supported,
display error.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit 2fe8d2d7911fb4e380c3dcb5655e1a62bb14f75e
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Sep 7 17:12:55 2023 -0700
tools/power/x86/intel-speed-select: No TRL for non compute domains
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>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit 3076db34b5ba87bb7a3335d16415befdea056d57
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Sep 7 17:01:55 2023 -0700
tools/power/x86/intel-speed-select: Update help for TRL
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>
Signed-off-by: Steve Best <sbest@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-17865
commit 61f3d868b3d6f5e23a6d25597133d76d2186eddd
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Sep 7 15:46:39 2023 -0700
tools/power/x86/intel-speed-select: Sanitize integer arguments
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>
Signed-off-by: Steve Best <sbest@redhat.com>
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3117
Bugzilla: https://bugzilla.redhat.com/2177050
upstream
========
commit a430021faad6b4fa86c820fc3e7f8dbfc2f14fb4
Author: Kan Liang <kan.liang@linux.intel.com>
Date: Mon May 22 04:30:35 2023 -0700
description
===========
The Grand Ridge and Sierra Forest are successors to Snow Ridge. They
both have Crestmont core. From the core PMU's perspective, they are
similar to the e-core of MTL. The only difference is the LBR event
logging feature, which will be implemented in the following patches.
Create a non-hybrid PMU setup for Grand Ridge and Sierra Forest.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/r/20230522113040.2329924-1-kan.liang@linux.intel.com
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Approved-by: Aristeu Rozanski <arozansk@redhat.com>
Approved-by: Jerry Snitselaar <jsnitsel@redhat.com>
Approved-by: Dean Nelson <dnelson@redhat.com>
Approved-by: David Arcari <darcari@redhat.com>
Signed-off-by: Scott Weaver <scweaver@redhat.com>
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3106
# Merge Request Required Information
## Summary of Changes
Add changes to lower drift in C0 percentage calculation when doing TSC reading.
Read TSC per CPU and also just after mperf reading to improve C0 percentage calculation in Mperf monitor.
Tested: See Jira issue for testing details
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
## Approved Development Ticket
JIRA: https://issues.redhat.com/browse/RHEL-10052
Approved-by: Lenny Szubowicz <lszubowi@redhat.com>
Approved-by: David Arcari <darcari@redhat.com>
Approved-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Scott Weaver <scweaver@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177050
upstream
========
commit 882cdb06b668488a42ef717a260c05ba7dc43a49
Author: Peter Zijlstra <peterz@infradead.org>
Date: Mon Aug 7 14:38:07 2023 +0200
description
===========
Alderlake N is an E-core only product using Gracemont
micro-architecture. It fits the pre-existing naming scheme perfectly
fine, adhere to it.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230807150405.686834933@infradead.org
Conflicts:
==========
Some hunks touch code that we haven't backported yet. I don't take it,
since it is unrelated to my area. Namely, I mean these patches:
- 7420ae3bb977 ("x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB")
- a414a08aefe6 ("drivers/thermal/intel: Add TCC cooling support for AlderLake platform")
- 312c1a44da37 ("thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P")
- 62f46fc7b8c6 ("thermal: intel_tcc_cooling: Add TCC cooling support for RaptorLake")
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit af75504c38960d5331b8c6c83ea9981e26d659e6
Author: Shuah Khan <skhan@linuxfoundation.org>
Date: Thu Aug 17 14:16:35 2023 -0600
cpupower: Add Georgian translation to Makefile LANGUAGES
Commit 4680b734e729 ("cpupower: Add Georgian translation") added
new language support. This change didn't add "ka" to Makefile
LANGUAGES variable. Add it now.
Reported-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Reported-by: Zurab Kargareteli <zuraxt@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit 99481d2195bfd13a663904e6014887abf46b57c7
Author: Likhitha Korrapati <likhitha@linux.ibm.com>
Date: Fri Jul 14 15:10:21 2023 +0530
cpupower: Fix cpuidle_set to accept only numeric values for idle-set operation.
For both the d and e options in 'cpupower idle_set' command, an
atoi() conversion is done without checking if the input argument
is all numeric. So, an atoi conversion is done on any character
provided as input and the CPU idle_set operation continues with
that integer value, which may not be what is intended or entirely
correct.
The output of cpuidle-set before patch is as follows:
[root@xxx cpupower]# cpupower idle-set -e 1$
Idlestate 1 enabled on CPU 0
[snip]
Idlestate 1 enabled on CPU 47
[root@xxx cpupower]# cpupower idle-set -e 11
Idlestate 11 not available on CPU 0
[snip]
Idlestate 11 not available on CPU 47
[root@xxx cpupower]# cpupower idle-set -d 12
Idlestate 12 not available on CPU 0
[snip]
Idlestate 12 not available on CPU 47
[root@xxx cpupower]# cpupower idle-set -d qw
Idlestate 0 disabled on CPU 0
[snip]
Idlestate 0 disabled on CPU 47
This patch adds a check for both d and e options in cpuidle-set.c
to see that the idle_set value is all numeric before doing a
string-to-int conversion using strtol().
The output of cpuidle-set after the patch is as below:
[root@xxx cpupower]# ./cpupower idle-set -e 1$
Bad idle_set value: 1$. Integer expected
[root@xxx cpupower]# ./cpupower idle-set -e 11
Idlestate 11 not available on CPU 0
[snip]
Idlestate 11 not available on CPU 47
[root@xxx cpupower]# ./cpupower idle-set -d 12
Idlestate 12 not available on CPU 0
[snip]
Idlestate 12 not available on CPU 47
[root@xxx cpupower]# ./cpupower idle-set -d qw
Bad idle_set value: qw. Integer expected
Signed-off-by: Brahadambal Srinivasan <latha@linux.vnet.ibm.com>
Signed-off-by: Likhitha Korrapati <likhitha@linux.ibm.com>
Tested-by: Pavithra Prakash <pavrampu@linux.vnet.ibm.com>
Reviewed-by: Rick Lindsley <ricklind@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit eb426fc6bdd6b731cbc0900f24a8c5fba10a7631
Author: Wyes Karny <wyes.karny@amd.com>
Date: Mon Jun 19 19:05:03 2023 +0000
cpupower: Add turbo-boost support in cpupower
If boost sysfs (/sys/devices/system/cpu/cpufreq/boost) file is present
turbo-boost is feature is supported in the hardware. By default this
feature should be enabled. But to disable/enable it write to the sysfs
file. Use the same to control this feature via cpupower.
To enable:
cpupower set --turbo-boost 1
To disable:
cpupower set --turbo-boost 0
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit df8776b03689987e3239f3c010b6dc6ab4185d30
Author: Wyes Karny <wyes.karny@amd.com>
Date: Mon Jun 19 19:05:02 2023 +0000
cpupower: Add support for amd_pstate mode change
amd_pstate supports changing of its mode dynamically via `status` sysfs
file. Add the same capability in cpupower. To change the mode to active
mode use below command:
cpupower set --amd-pstate-mode active
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit f2ab5557119a5ccd0ceaf7ecdca00ab782cd76c5
Author: Wyes Karny <wyes.karny@amd.com>
Date: Mon Jun 19 19:05:01 2023 +0000
cpupower: Add EPP value change support
amd_pstate and intel_pstate active mode drivers support energy
performance preference feature. Through this user can convey it's
energy/performance preference to platform. Add this value change
capability to cpupower.
To change the EPP value use below command:
cpupower set --epp performance
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit a1cf97c2d43ae51f3de091d51adff6b70a5cd55c
Author: Wyes Karny <wyes.karny@amd.com>
Date: Mon Jun 19 19:04:59 2023 +0000
cpupower: Recognise amd-pstate active mode driver
amd-pstate active mode driver name is "amd-pstate-epp". Use common
prefix for string matching condition to recognise amd-pstate active mode
driver.
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit d7de5d8e403a1293e10f8f59a1f2db320232c831
Author: Ben Hutchings <ben@decadent.org.uk>
Date: Wed May 17 21:10:20 2023 +0200
cpupower: Bump soname version
Several functions in the libcpupower API are renamed or removed in
Linux 4.7. This is an backward-incompatible ABI change, so the
library soname should change from libcpupower.so.0 to
libcpupower.so.1.
Fixes: ac5a181d06 ("cpupower: Add cpuidle parts into library")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit e652be0f59d4ba4d5c636b1f7f4dcb73aae049fa
Author: Hao Zeng <zenghao@kylinos.cn>
Date: Tue Apr 18 09:30:56 2023 +0800
cpupower:Fix resource leaks in sysfs_get_enabled()
The sysfs_get_enabled() opened file processor not closed,
may cause a file handle leak.
Putting error handling and resource cleanup code together
makes the code easy to maintain and read.
Removed the unnecessary else if branch from the original
function, as it should return an error in cases other than '0'.
Signed-off-by: Hao Zeng <zenghao@kylinos.cn>
Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit 8c37df3d635eac64a8fbb4b26672fb881e0cb673
Author: Thomas Renninger <trenn@suse.de>
Date: Wed Nov 23 12:18:10 2022 +0100
cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain
This CPU power monitor shows the power consumption
as exposed by the powercap subsystem, cmp with:
Documentation/power/powercap/powercap.rst
cpupower monitor -m RAPL
| RAPL
CPU| pack | core | unco
0|6853926|967832|442381
8|6853926|967832|442381
1|6853926|967832|442381
9|6853926|967832|442381
Unfortunately RAPL domains cannot be directly mapped to the corresponding
CPU socket/package, core it belongs to.
Not sure this is possible at all with the current data exposed from the
kernel.
Still it can be worthful information for developers trying to optimize
power consumption of workloads or their system in general.
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Zhang Rui <rui.zhang@intel.com>
CC: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit c2294c1496b7169d5b14c2fa27526ba35da9f5ac
Author: Thomas Renninger <trenn@suse.de>
Date: Wed Nov 23 12:18:09 2022 +0100
cpupower: Introduce powercap intel-rapl library and powercap-info command
Read out powercap zone information via:
cpupower powercap-info
and show the zone hierarchy to the user:
./cpupower powercap-info
Driver: intel-rapl
Powercap domain hierarchy:
Zone: package-0 (enabled)
Power consumption can be monitored in micro Watts
Zone: core (disabled)
Power consumption can be monitored in micro Watts
Zone: uncore (disabled)
Power consumption can be monitored in micro Watts
Zone: dram (disabled)
Power consumption can be monitored in micro Watts
There is a dummy -a option for powercap-info which can/should be used to
show more detailed info later. Like that other args can be added easily
later as well.
A enable/disable option via powercap-set subcommand is also an enhancement
for later.
Also not all RAPL domains are shown. The func walking through RAPL
subdomains is restricted and hardcoded to: "intel-rapl/intel-rapl:0"
On my system above powercap domains map to:
intel-rapl/intel-rapl:0
-> pack (age-0)
intel-rapl/intel-rapl:0/intel-rapl:0:0
-> core
intel-rapl/intel-rapl:0/intel-rapl:0:1
-> uncore
Missing ones on my system are:
intel-rapl-mmio/intel-rapl-mmio:0
-> pack (age-0)
intel-rapl/intel-rapl:1
-> psys
This could get enhanced in:
struct powercap_zone *powercap_init_zones()
and adopted to walk through all intel-rapl zones, but
also to other powercap drivers like dtpm
(Dynamic Thermal Power Management framework),
cmp with: drivers/powercap/dtpm_*
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit 5975e2558e2dea7ef35fbb1a29613e1c176bd190
Author: Saket Kumar Bhaskar <skb99@linux.vnet.ibm.com>
Date: Wed Nov 23 13:52:08 2022 +0530
tools/cpupower: Choose base_cpu to display default cpupower details
The default output of cpupower info utils shows unexpected output
when CPU 0 is disabled.
Considering a case where CPU 0 is disabled, output of cpupower idle-info:
Before change:
cpupower idle-info
CPUidle driver: pseries_idle
CPUidle governor: menu
analyzing CPU 0:
*is offline
After change:
./cpupower idle-info
CPUidle driver: pseries_idle
CPUidle governor: menu
analyzing CPU 50:
Number of idle states: 2
Available idle states: snooze CEDE
snooze:
Flags/Description: snooze
Latency: 0
Usage: 101748
Duration: 2724058
CEDE:
Flags/Description: CEDE
Latency: 12
Usage: 270004
Duration: 283019526849
If -c option is not passed, CPU 0 was chosen as the default chosen CPU to
display details. However when CPU 0 is offline, it results in showing
unexpected output. This commit chooses the base_cpu
instead of CPU 0, hence keeping the output more relevant in all cases.
The base_cpu is the number of CPU on which the calling thread is
currently executing.
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-10052
commit fa82cce7a6bbb35ecf7fe66231c7076052cf66d5
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue Jun 7 16:11:34 2022 +0200
treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE
Based on the normalized pattern:
licensed under the gpl v2
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference.
Reviewed-by: Allison Randal <allison@lohutok.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Joel Slebodnick <jslebodn@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 2fff509adceb10f991b259c02ef2e096a89f075e
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Aug 8 14:37:02 2023 -0700
tools/power/x86/intel-speed-select: v1.17 release
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit dde9293b62c5af5c905f371ea47f10b5ab257624
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Wed Aug 9 08:53:04 2023 -0700
tools/power/x86/intel-speed-select: Change mem-frequency display name
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 01bcb56f059e1e9a56e1d121a0dc09df9e1714ff
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Aug 8 14:12:01 2023 -0700
tools/power/x86/intel-speed-select: Prevent CPU 0 offline
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit e67b6ed2bbd1516f949202503207f44b3066bdec
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Tue Aug 8 13:08:03 2023 -0700
tools/power/x86/intel-speed-select: Error on CPU count exceed in request
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 06bbebdb6da5e816f206c09ce20321237e5910e9
Author: Frank Ramsay <frank.ramsay@hpe.com>
Date: Thu Jul 20 11:08:03 2023 -0500
tools/power/x86/intel-speed-select: Support more than 8 sockets.
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 7a4ab2f4795bfa7cfe10330ce4a2452748f31b68
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Jun 15 16:18:15 2023 -0700
tools/power/x86/intel-speed-select: Fix CPU count display
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 7244720ac137e3193db11b009fc33c0dd4e999c9
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Mon Jun 12 16:10:37 2023 -0700
tools/power/x86/intel-speed-select: v1.16 release
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 4ebde55b7de1a25a9e20ae91e42157798ef8e958
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu May 18 09:49:35 2023 -0700
tools/power/x86/intel-speed-select: Adjust scope of core-power config
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 2c00056f54299983009c13a8790fa004e5337d16
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Feb 23 06:36:46 2023 -0800
tools/power/x86/intel-speed-select: Change TRL display for Emerald Rapids
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit a835ff56dd9ce2dfc53526085ba8efc2807b9bcb
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Thu Feb 23 05:59:24 2023 -0800
tools/power/x86/intel-speed-select: Display AMX base frequency
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 1d54b139f43482a5d394f26ce47aa9949dec6e76
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Wed Feb 22 22:53:02 2023 -0800
tools/power/x86/intel-speed-select: Identify Emerald Rapids
There are some differences compared to Sapphire Rapids. So, add a separate
API.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 19799d3ae2edec99435b792cfe76b1cba74665fe
Author: Zhang Rui <rui.zhang@intel.com>
Date: Mon Oct 17 19:34:14 2022 +0800
tools/power/x86/intel-speed-select: Update version
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 997074df658e444e79a5294b685b77b08a3c414c
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Wed Feb 22 03:42:19 2023 -0800
tools/power/x86/intel-speed-select: Use cgroup v2 isolation
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 57797f19d5a78b5a84b7452790f7da22865f6420
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Wed Feb 22 03:26:29 2023 -0800
tools/power/x86/intel-speed-select: Add missing free cpuset
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 137ba3b13aacf80b64d363dd7cff69c2aed161f0
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Jan 7 21:45:42 2023 +0800
tools/power/x86/intel-speed-select: Fix clos-max display with TPMI I/F
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit d0e12c46f518620551d719b19b93777dafd0b5e6
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Sep 13 20:23:19 2022 +0800
tools/power/x86/intel-speed-select: Add cpu id check
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 14f0cf6cfa53a3a4f2f713b1d54eb71e96ff34cb
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Feb 2 15:55:25 2023 +0800
tools/power/x86/intel-speed-select: Avoid setting duplicate tdp level
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit c7ff8ff3b29ee031a2194f67b5ceced9b77fdc21
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 18 21:26:23 2022 +0800
tools/power/x86/intel-speed-select: Remove cpu mask display for non-cpu 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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit ca7c5d5b75fdac884d2ad6acd7cb28e3f1dfee9c
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 18 01:51:15 2022 +0800
tools/power/x86/intel-speed-select: Show level 0 name for new api_version
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 443bf104ef10cfc0d22698613f8ba178427d4538
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 18 01:45:33 2022 +0800
tools/power/x86/intel-speed-select: Prevent cpu clos config for non-cpu power domain
Non-cpu power domain does not support cpu clos config.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 2e54ba89ec5286d041999e6566ae96267d33b002
Author: Zhang Rui <rui.zhang@intel.com>
Date: Thu Aug 18 01:34:55 2022 +0800
tools/power/x86/intel-speed-select: Allow display non-cpu power domain info
Some power domain may not have CPUs associated, allow displaying
information for these non-cpu power domains.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 46de87e39b871f926b429b14bde845412b541841
Author: Zhang Rui <rui.zhang@intel.com>
Date: Wed Aug 10 17:14:11 2022 +0800
tools/power/x86/intel-speed-select: Display punit info
Display punit info for platforms with new api_version.
For platforms with old api_version, don't display the punit info to be
backward compatible.
For example:
Intel(R) Speed Select Technology
Executing on CPU model:173[0xad]
package-0
die-0
powerdomain-0
cpu-0
get-config-current_level:0
package-0
die-0
powerdomain-3
cpu--1
get-config-current_level:0
package-0
die-0
powerdomain-4
cpu--1
get-config-current_level:0
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 5f319081657cb653b55d2c9ef393fc5cd7aae6d4
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Aug 9 03:29:23 2022 +0800
tools/power/x86/intel-speed-select: Display amx_p1 and cooling_type
amx_p1 and cooling_type are newly introduced for TPMI interface.
Display amx_p1 and cooling_type info for platforms that support them.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 79554aaa224a3b99f95b9c2843dc904764c32541
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Aug 9 00:01:00 2022 +0800
tools/power/x86/intel-speed-select: Introduce TPMI interface support
TPMI (Topology Aware Register and PM Capsule Interface) creates a
flexible, extendable and software-PCIe-driver-enumerable MMIO interface
for PM features.
SST feature is exposed via the TPMI interface on newer Xeon platforms.
Kernel TPMI based SST driver provides a series of new IOCTLs for userspace
to use.
Introduce support for the platforms that do SST control via TPMI interface.
Compared with previous platforms, Newer Xeons also supports multi-punit in a
package/die, including cpu punit and non-cpu punit. These have already
been handled in the generic code.
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit a0ca5a097342f78d41e104d8d6bb0742ff0e7330
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Mon Mar 6 09:26:28 2023 -0800
tools/power/x86/intel-speed-select: Get punit core mapping information
Get punit core mapping information using format of MSR 0x54. Based
on the API version, decode is done using new format. The new format
also include a power domain ID. TPMI SST information is for each
power domain.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 887e5be91dd253ff73c0b2644442c0cae5d6dca0
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Aug 20 20:51:33 2022 +0800
tools/power/x86/intel-speed-select: Introduce api_version helper
In some cases, the output format may be different with different
api_version because of different capabilities or for backward
capabilities reason.
Introduce api_version() to get the api_version of the platform running.
No functional changes are expected.
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 20f06c9db22bf45de595a2a5855630b075596217
Author: Zhang Rui <rui.zhang@intel.com>
Date: Tue Aug 16 21:20:00 2022 +0800
tools/power/x86/intel-speed-select: Support large clos_min/max
clos_min/max in TPMI interface is frequency in MHz, thus clos_min/max
needs to support larger values.
No functional changes are expected.
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 05aab5b8c1b78c028cd95701e788623de744d1cd
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Aug 20 20:40:48 2022 +0800
tools/power/x86/intel-speed-select: Allow api_version based platform callbacks
Different api_version suggests different kernel driver used and
different interface is used to communication with the hardware.
Allow setting platform specific callbacks based on api_version.
Currently, all platforms with api_version 1 uses Mbox/MMIO interfaces.
No functional changes are expected.
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>
Signed-off-by: David Arcari <darcari@redhat.com>
Bugzilla: https://bugzilla.redhat.com/2177018
commit 2b86ed225e657867b405b3e9412e9efefcbe6ffb
Author: Zhang Rui <rui.zhang@intel.com>
Date: Sat Aug 20 20:14:15 2022 +0800
tools/power/x86/intel-speed-select: Move send_mbox_cmd to isst-core-mbox.c
After the previous cleanup, there is no user of send_mbox_cmd outside of
isst-core-mbox.c.
Thus move send_mbox_cmd to isst-core-mbox.c as internal functions.
No functional changes are expected.
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>
Signed-off-by: David Arcari <darcari@redhat.com>