From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: rafael@kernel.org, daniel.lezcano@linaro.org
Cc: corbet@lwn.net, linux-pm@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH] Documentation: thermal: Add documentation for thermal throttle
Date: Wed, 12 Nov 2025 17:41:14 -0800 [thread overview]
Message-ID: <20251113014116.196638-1-srinivas.pandruvada@linux.intel.com> (raw)
Add documentation for Intel thermal throttling reporting events.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
Documentation/admin-guide/thermal/index.rst | 1 +
.../admin-guide/thermal/thermal_throttle.rst | 84 +++++++++++++++++++
2 files changed, 85 insertions(+)
create mode 100644 Documentation/admin-guide/thermal/thermal_throttle.rst
diff --git a/Documentation/admin-guide/thermal/index.rst b/Documentation/admin-guide/thermal/index.rst
index 193b7b01a87d..2e0cafd19f6b 100644
--- a/Documentation/admin-guide/thermal/index.rst
+++ b/Documentation/admin-guide/thermal/index.rst
@@ -6,3 +6,4 @@ Thermal Subsystem
:maxdepth: 1
intel_powerclamp
+ thermal_throttle
diff --git a/Documentation/admin-guide/thermal/thermal_throttle.rst b/Documentation/admin-guide/thermal/thermal_throttle.rst
new file mode 100644
index 000000000000..ab146ffdffca
--- /dev/null
+++ b/Documentation/admin-guide/thermal/thermal_throttle.rst
@@ -0,0 +1,84 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: <isonum.txt>
+
+=======================================
+Intel thermal throttle events reporting
+=======================================
+
+:Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+
+Introduction
+------------
+
+Intel processors have built in automatic and adaptive thermal monitoring mechanisms
+that force the processor to reduce its power consumption in order to operate within
+predetermined temperature limits.
+
+Refer to section "THERMAL MONITORING AND PROTECTION" in the "Intel® 64 and IA-32
+Architectures Software Developer’s Manual Volume 3 (3A, 3B, 3C, & 3D): System
+Programming Guide" for more details.
+
+In general, there are two mechanisms to control the core temperature of the processor.
+They are called "Thermal Monitor 1 (TM1) and Thermal Monitor 2 (TM2)".
+
+The status of the temperature sensor that triggers the thermal monitor (TM1/TM2) is
+indicated through the "thermal status flag" and "thermal status log flag" in the
+IA32_THERM_STATUS MSR for core level and IA32_PACKAGE_THERM_STATUS for package level.
+
+Thermal Status flag, bit 0 — When set, indicates that the processor core temperature
+is currently at the trip temperature of the thermal monitor and that the processor power
+consumption is being reduced via either TM1 or TM2, depending on which is enabled. When
+clear, the flag indicates that the core temperature is below the thermal monitor trip
+temperature. This flag is read only.
+
+Thermal Status Log flag, bit 1 — When set, indicates that the thermal sensor has tripped
+since the last power-up or reset or since the last time that software cleared this flag.
+This flag is a sticky bit; once set it remains set until cleared by software or until a
+power-up or reset of the processor. The default state is clear.
+
+It is possible that when user reads IA32_THERM_STATUS or IA32_PACKAGE_THERM_STATUS,
+TM1/TM2 is not active. In this case, "Thermal Status flag" will read "0" and the
+"Thermal Status Log flag" will be set to show any previous "TM1/TM2" activation. But
+since it needs to be cleared by software, it can't show the number of occurrences of
+"TM1/TM2" activations.
+
+Hence, Linux provides counters of how many times the "Thermal Status flag" was set. Also
+presents how long the "Thermal Status flag" was active in milliseconds. Using these counters,
+users can check if the performance was limited because of thermal events. It is recommended
+to read from sysfs instead of directly reading MSRs as the "Thermal Status Log flag" is reset
+by the driver to implement rate control.
+
+Sysfs Interface
+---------------
+
+Thermal throttling events are presented for each CPU under
+"/sys/devices/system/cpu/cpuX/thermal_throttle/", where "X" is the CPU number.
+
+All these counters are read-only. They can't be reset to 0. So, they can potentially
+overflow after reaching the maximum 64 bit unsigned integer.
+
+``core_throttle_count``
+ This shows how many times "Thermal Status flag" changed from 0 to 1
+ for this CPU. This is a 64 bit counter.
+
+``package_throttle_count``
+ This shows how many times "Thermal Status flag" changed from 0 to 1
+ for this package. Package status is broadcast to all CPUs; all CPUs in
+ the package increment this count. This is a 64-bit counter.
+
+``core_throttle_max_time_ms``
+ This shows the maximum amount of time "Thermal Status flag" was set to 1
+ for this CPU for core level flag.
+
+``package_throttle_max_time_ms``
+ This shows the maximum amount of time "Thermal Status flag" was set to 1
+ for this CPU for package level flag.
+
+``core_throttle_total_time_ms``
+ This shows the cumulative time "Thermal Status flag" was set to 1 for this
+ CPU for core level flag.
+
+``package_throttle_total_time_ms``
+ This shows the cumulative time "Thermal Status flag" was set to 1 for this
+ CPU for package level flag.
+
--
2.43.0
next reply other threads:[~2025-11-13 1:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 1:41 Srinivas Pandruvada [this message]
2025-11-13 5:49 ` Randy Dunlap
2025-11-13 21:22 ` srinivas pandruvada
2025-11-13 11:04 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251113014116.196638-1-srinivas.pandruvada@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=corbet@lwn.net \
--cc=daniel.lezcano@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®