@@ -1159,6 +1159,15 @@ config X86_THERMAL_VECTOR
def_bool y
depends on X86_MCE_INTEL
+config X86_MCE_THERMAL_VERBOSE
+ bool "Verbose logging for thermal events"
+ depends on X86_THERMAL_VECTOR
+ ---help---
+ Display messages in the kernel log when thermal events are triggered,
+ such as overheating and throttling. This mostly only uses extra CPU
+ for ratelimiting and book keeping, so unless you need these logs, it
+ is safe to say N.
+
source "arch/x86/events/Kconfig"
config X86_LEGACY_VM86
@@ -313,6 +313,9 @@ static void therm_throt_process(bool new_event, int event, int level)
u64 now;
struct thermal_state *pstate = &per_cpu(thermal_state, this_cpu);
+ if (!IS_ENABLED(CONFIG_X86_MCE_THERMAL_VERBOSE))
+ return;
+
now = get_jiffies_64();
if (level == CORE_LEVEL) {
if (event == THERMAL_THROTTLING_EVENT)
There is an enormous amount of fiddly book keeping and an auxiliary workqueue just for the purpose of ratelimiting and reliably printing messages regarding thermal events and throttling, which uses CPU in a rather common interrupt. Add an option to disable this verbose reporting. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- arch/x86/Kconfig | 9 +++++++++ arch/x86/kernel/cpu/mce/therm_throt.c | 3 +++ 2 files changed, 12 insertions(+)