[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FR2P281MB268504A9A1DD29C5BB7F0241BAD8A@FR2P281MB2685.DEUP281.PROD.OUTLOOK.COM>
Date: Tue, 2 Dec 2025 09:09:19 +0000
From: "Ehlert, Emily" <ehemily@...zon.de>
To: Len Brown <lenb@...nel.org>
CC: "Zhang, Rui" <rui.zhang@...el.com>, "linux-pm@...r.kernel.org"
<linux-pm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Emily Ehlert <ehemily@...zon.com>
Subject: Re: [PATCH 2/2] tools/power/turbostat: Fix division by zero when TDP
calculation fails
Thanks for the patch. I think there is one small mistake leading to RAPL not being disabled properly if the read is 0. This patch here should fix it and makes turbostat run with good values.
```
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index c2b72b4e80c4..b5da37ce5ac7 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -7986,9 +7986,11 @@ void probe_rapl_msrs(void)
fprintf(outf, "Can not read RAPL_PKG_ENERGY MSR(0x%llx)\n", (unsigned long long)offset);
return;
}
- if (msr_value == 0)
+ if (msr_value == 0) {
if (debug)
fprintf(outf, "RAPL_PKG_ENERGY MSR(0x%llx) == ZERO: disabling all RAPL MSRs\n", (unsigned long long)offset);
+ return;
+ }
valid_rapl_msrs = platform->plat_rapl_msrs; /* success */
}
```
Log output of turbostat with this patch applied:
```
turbostat version 2025.12.01 - Len Brown <lenb@...nel.org>
Kernel command line: BOOT_IMAGE=/vmlinuz-6.14.0-1015-aws root=PARTUUID=cd553419-794d-4da4-9ba5-c355f5f9f74d ro console=tty1 console=ttyS0 nvme_core.io_timeout=4294967295 panic=-1
add_counter(msr0, cpuidle/state3/time, C6%, width64, scope0, type3, format2, flags2, id0)
add_counter(msr0, cpuidle/state2/time, C1E%, width64, scope0, type3, format2, flags2, id0)
find_msrp_by_name: C1E% C6%
add_counter(msr0, cpuidle/state1/time, C1%, width64, scope0, type3, format2, flags2, id0)
find_msrp_by_name: C1% C1E%
find_msrp_by_name: C1% C6%
add_counter(msr0, cpuidle/state0/time, POLL%, width64, scope0, type3, format2, flags2, id0)
find_msrp_by_name: POLL% C1%
find_msrp_by_name: POLL% C1E%
find_msrp_by_name: POLL% C6%
add_counter(msr0, cpuidle/state3/below, C6+, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C6+ POLL%
find_msrp_by_name: C6+ C1%
find_msrp_by_name: C6+ C1E%
find_msrp_by_name: C6+ C6%
add_counter(msr0, cpuidle/state3/usage, C6, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C6 C6+
find_msrp_by_name: C6 POLL%
find_msrp_by_name: C6 C1%
find_msrp_by_name: C6 C1E%
find_msrp_by_name: C6 C6%
add_counter(msr0, cpuidle/state3/above, C6-, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C6- C6
find_msrp_by_name: C6- C6+
find_msrp_by_name: C6- POLL%
find_msrp_by_name: C6- C1%
find_msrp_by_name: C6- C1E%
find_msrp_by_name: C6- C6%
add_counter(msr0, cpuidle/state2/below, C1E+, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1E+ C6-
find_msrp_by_name: C1E+ C6
find_msrp_by_name: C1E+ C6+
find_msrp_by_name: C1E+ POLL%
find_msrp_by_name: C1E+ C1%
find_msrp_by_name: C1E+ C1E%
find_msrp_by_name: C1E+ C6%
add_counter(msr0, cpuidle/state2/usage, C1E, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1E C1E+
find_msrp_by_name: C1E C6-
find_msrp_by_name: C1E C6
find_msrp_by_name: C1E C6+
find_msrp_by_name: C1E POLL%
find_msrp_by_name: C1E C1%
find_msrp_by_name: C1E C1E%
find_msrp_by_name: C1E C6%
add_counter(msr0, cpuidle/state2/above, C1E-, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1E- C1E
find_msrp_by_name: C1E- C1E+
find_msrp_by_name: C1E- C6-
find_msrp_by_name: C1E- C6
find_msrp_by_name: C1E- C6+
find_msrp_by_name: C1E- POLL%
find_msrp_by_name: C1E- C1%
find_msrp_by_name: C1E- C1E%
find_msrp_by_name: C1E- C6%
add_counter(msr0, cpuidle/state1/below, C1+, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1+ C1E-
find_msrp_by_name: C1+ C1E
find_msrp_by_name: C1+ C1E+
find_msrp_by_name: C1+ C6-
find_msrp_by_name: C1+ C6
find_msrp_by_name: C1+ C6+
find_msrp_by_name: C1+ POLL%
find_msrp_by_name: C1+ C1%
find_msrp_by_name: C1+ C1E%
find_msrp_by_name: C1+ C6%
add_counter(msr0, cpuidle/state1/usage, C1, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1 C1+
find_msrp_by_name: C1 C1E-
find_msrp_by_name: C1 C1E
find_msrp_by_name: C1 C1E+
find_msrp_by_name: C1 C6-
find_msrp_by_name: C1 C6
find_msrp_by_name: C1 C6+
find_msrp_by_name: C1 POLL%
find_msrp_by_name: C1 C1%
find_msrp_by_name: C1 C1E%
find_msrp_by_name: C1 C6%
add_counter(msr0, cpuidle/state1/above, C1-, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: C1- C1
find_msrp_by_name: C1- C1+
find_msrp_by_name: C1- C1E-
find_msrp_by_name: C1- C1E
find_msrp_by_name: C1- C1E+
find_msrp_by_name: C1- C6-
find_msrp_by_name: C1- C6
find_msrp_by_name: C1- C6+
find_msrp_by_name: C1- POLL%
find_msrp_by_name: C1- C1%
find_msrp_by_name: C1- C1E%
find_msrp_by_name: C1- C6%
add_counter(msr0, cpuidle/state0/usage, POLL, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: POLL C1-
find_msrp_by_name: POLL C1
find_msrp_by_name: POLL C1+
find_msrp_by_name: POLL C1E-
find_msrp_by_name: POLL C1E
find_msrp_by_name: POLL C1E+
find_msrp_by_name: POLL C6-
find_msrp_by_name: POLL C6
find_msrp_by_name: POLL C6+
find_msrp_by_name: POLL POLL%
find_msrp_by_name: POLL C1%
find_msrp_by_name: POLL C1E%
find_msrp_by_name: POLL C6%
add_counter(msr0, cpuidle/state0/above, POLL-, width64, scope0, type0, format1, flags2, id0)
find_msrp_by_name: POLL- POLL
find_msrp_by_name: POLL- C1-
find_msrp_by_name: POLL- C1
find_msrp_by_name: POLL- C1+
find_msrp_by_name: POLL- C1E-
find_msrp_by_name: POLL- C1E
find_msrp_by_name: POLL- C1E+
find_msrp_by_name: POLL- C6-
find_msrp_by_name: POLL- C6
find_msrp_by_name: POLL- C6+
find_msrp_by_name: POLL- POLL%
find_msrp_by_name: POLL- C1%
find_msrp_by_name: POLL- C1E%
find_msrp_by_name: POLL- C6%
cpu 0 pkg 0 die 0 l3 0 node 0 lnode 0 core 0 thread 0
cpu 1 pkg 0 die 0 l3 0 node 0 lnode 0 core 1 thread 0
cpu 2 pkg 0 die 0 l3 0 node 0 lnode 0 core 2 thread 0
cpu 3 pkg 0 die 0 l3 0 node 0 lnode 0 core 3 thread 0
cpu 4 pkg 0 die 0 l3 0 node 0 lnode 0 core 0 thread 1
cpu 5 pkg 0 die 0 l3 0 node 0 lnode 0 core 1 thread 1
cpu 6 pkg 0 die 0 l3 0 node 0 lnode 0 core 2 thread 1
cpu 7 pkg 0 die 0 l3 0 node 0 lnode 0 core 3 thread 1
CPUID(0): GenuineIntel 0x1f CPUID levels
CPUID(1): family:model:stepping 0x6:8f:8 (6:143:8) microcode 0x2b000643
CPUID(0x80000000): max_extended_levels: 0x80000008
CPUID(1): SSE3 MONITOR - - - TSC MSR - HT -
CPUID(6): APERF, TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB
cpu0: MSR_IA32_MISC_ENABLE: 0x00000001 (No-TCC No-EIST No-MWAIT PREFETCH TURBO)
CPUID(7): No-SGX No-Hybrid
CPUID(0x16): base_mhz: 0 max_mhz: 0 bus_mhz: 0
cpu0: MSR_PLATFORM_INFO: 0x80080001800
8 * 100.0 = 800.0 MHz max efficiency frequency
24 * 100.0 = 2400.0 MHz base frequency
cpu0: MSR_TURBO_RATIO_LIMIT: 0x2020212123242526
cpu0: MSR_TURBO_RATIO_LIMIT1: 0x302e2c2a26221e18
32 * 100.0 = 3200.0 MHz max turbo 48 active cores
32 * 100.0 = 3200.0 MHz max turbo 46 active cores
33 * 100.0 = 3300.0 MHz max turbo 44 active cores
33 * 100.0 = 3300.0 MHz max turbo 42 active cores
35 * 100.0 = 3500.0 MHz max turbo 38 active cores
36 * 100.0 = 3600.0 MHz max turbo 34 active cores
37 * 100.0 = 3700.0 MHz max turbo 30 active cores
38 * 100.0 = 3800.0 MHz max turbo 24 active cores
cpu0: MSR_CONFIG_TDP_NOMINAL: 0x00000000 (base_ratio=0)
cpu0: MSR_CONFIG_TDP_LEVEL_1: 0x00000000 ()
cpu0: MSR_CONFIG_TDP_LEVEL_2: 0x00000000 ()
cpu0: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu0: MSR_TURBO_ACTIVATION_RATIO: 0x00000000 (MAX_NON_TURBO_RATIO=0 lock=0)
NSFOD /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
cpu0: MSR_MISC_PWR_MGMT: 0x00000100 (ENable-EIST_Coordination DISable-EPB ENable-OOB)
cpu0: MSR_IA32_POWER_CTL: 0x00000000 (C1E auto-promotion: DISabled)
C-state Pre-wake: ENabled
cpu0: MSR_PKG_CST_CONFIG_CONTROL: 0x00008000 (locked, pkg-cstate-limit=0 (pc0))
/dev/cpu_dma_latency: 2000000000 usec (default)
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu0: POLL: CPUIDLE CORE POLL IDLE
cpu0: C1: MWAIT 0x00
cpu0: C1E: MWAIT 0x01
cpu0: C6: MWAIT 0x20
cpu0: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
RAPL_PKG_ENERGY MSR(0x611) == ZERO: disabling all RAPL MSRs
cpu0: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
add_msr_perf_counter: msr/aperf: 6 (cpu: 0)
add_msr_perf_counter: msr/aperf: 7 (cpu: 1)
add_msr_perf_counter: msr/aperf: 8 (cpu: 2)
add_msr_perf_counter: msr/aperf: 9 (cpu: 3)
add_msr_perf_counter: msr/aperf: 10 (cpu: 4)
add_msr_perf_counter: msr/aperf: 11 (cpu: 5)
add_msr_perf_counter: msr/aperf: 12 (cpu: 6)
add_msr_perf_counter: msr/aperf: 13 (cpu: 7)
add_msr_perf_counter: msr/mperf: 14 (cpu: 0)
add_msr_perf_counter: msr/mperf: 15 (cpu: 1)
add_msr_perf_counter: msr/mperf: 16 (cpu: 2)
add_msr_perf_counter: msr/mperf: 17 (cpu: 3)
add_msr_perf_counter: msr/mperf: 18 (cpu: 4)
add_msr_perf_counter: msr/mperf: 19 (cpu: 5)
add_msr_perf_counter: msr/mperf: 20 (cpu: 6)
add_msr_perf_counter: msr/mperf: 21 (cpu: 7)
add_msr_perf_counter: msr/smi: 22 (cpu: 0)
add_msr_perf_counter: msr/smi: 23 (cpu: 1)
add_msr_perf_counter: msr/smi: 24 (cpu: 2)
add_msr_perf_counter: msr/smi: 25 (cpu: 3)
add_msr_perf_counter: msr/smi: 26 (cpu: 4)
add_msr_perf_counter: msr/smi: 27 (cpu: 5)
add_msr_perf_counter: msr/smi: 28 (cpu: 6)
add_msr_perf_counter: msr/smi: 29 (cpu: 7)
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-pkg.scale
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-pkg.scale
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-cores.scale
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-ram.scale
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-gpu.scale
Failed to parse perf counter info /sys/bus/event_source/devices/power/events/energy-psys.scale
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_core/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
Failed to parse perf counter info /sys/bus/event_source/devices/cstate_pkg/type
usec Time_Of_Day_Seconds Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI LLCkRPS LLC%hit POLL- POLL C1- C1 C1+ C1E- C1E C1E+ C6- C6 C6+ POLL% C1% C1E% C6% CPU%c1 CPU%c6
1632 1764666333.980537 - - - - 17 0.49 3502 2400 0.08 517 0 0 0 -nan 0 0 0 0 0 3 221 59 643 10722 0 0.00 0.00 0.17 99.70 0.35 99.00
148 1764666333.979303 0 0 0 0 20 0.58 3506 2400 0.12 99 0 0 0 -nan 0 0 0 0 0 0 24 11 130 1398 0 0.00 0.00 0.21 99.61 0.30 98.99
94 1764666333.979428 0 4 1 1 17 0.48 3504 2400 0.12 13 0 0 0 -nan 0 0 0 0 0 0 5 2 83 1337 0 0.00 0.00 0.04 99.84 0.30
169 1764666333.979757 1 1 2 2 17 0.48 3502 2400 0.06 65 0 0 0 -nan 0 0 0 0 0 0 10 2 89 1353 0 0.00 0.00 0.07 99.80 0.16 99.22
93 1764666333.979898 1 5 3 3 16 0.45 3501 2400 0.05 37 0 0 0 -nan 0 0 0 0 0 0 5 2 82 1337 0 0.00 0.00 0.04 99.86 0.16
106 1764666333.980159 2 2 4 4 15 0.44 3498 2400 0.05 25 0 0 0 -nan 0 0 0 0 0 1 9 4 30 1288 0 0.00 0.00 0.11 99.80 0.15 99.28
91 1764666333.980281 2 6 5 5 15 0.43 3499 2400 0.05 29 0 0 0 -nan 0 0 0 0 0 0 10 1 35 1290 0 0.00 0.00 0.05 99.86 0.15
104 1764666333.980417 3 3 6 6 19 0.55 3501 2400 0.08 172 0 0 0 -nan 0 0 0 0 0 1 116 29 109 1369 0 0.00 0.00 0.64 99.18 0.78 98.50
90 1764666333.980537 3 7 7 7 17 0.48 3504 2400 0.08 77 0 0 0 -nan 0 0 0 0 0 1 42 8 85 1350 0 0.00 0.00 0.21 99.67 0.78
usec Time_Of_Day_Seconds Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI LLCkRPS LLC%hit POLL- POLL C1- C1 C1+ C1E- C1E C1E+ C6- C6 C6+ POLL% C1% C1E% C6% CPU%c1 CPU%c6
1894 1764666338.987679 - - - - 16 0.47 3501 2400 0.06 370 0 0 0 -nan 0 0 0 0 0 0 111 49 449 10553 0 0.00 0.00 0.12 99.76 0.29 99.08
142 1764666338.986310 0 0 0 0 20 0.58 3501 2400 0.08 134 0 0 0 -nan 0 0 0 0 0 0 47 30 113 1389 0 0.00 0.00 0.55 99.27 0.63 98.65
98 1764666338.986439 0 4 1 1 16 0.46 3497 2400 0.05 8 0 0 0 -nan 0 0 0 0 0 0 3 0 69 1326 0 0.00 0.00 0.02 99.89 0.63
162 1764666338.986756 1 1 2 2 16 0.46 3502 2400 0.06 41 0 0 0 -nan 0 0 0 0 0 0 6 0 49 1312 0 0.00 0.00 0.03 99.86 0.08 99.34
95 1764666338.986903 1 5 3 3 15 0.43 3501 2400 0.05 8 0 0 0 -nan 0 0 0 0 0 0 2 0 28 1286 0 0.00 0.00 0.01 99.91 0.08
109 1764666338.987175 2 2 4 4 16 0.44 3499 2400 0.05 28 0 0 0 -nan 0 0 0 0 0 0 2 1 36 1295 0 0.00 0.00 0.02 99.89 0.06 99.38
94 1764666338.987314 2 6 5 5 15 0.44 3500 2400 0.05 25 0 0 0 -nan 0 0 0 0 0 0 1 0 36 1293 0 0.00 0.00 0.01 99.90 0.06
104 1764666338.987548 3 3 6 6 16 0.47 3503 2400 0.05 76 0 0 0 -nan 0 0 0 0 0 0 37 11 57 1321 0 0.00 0.00 0.24 99.64 0.40 98.95
92 1764666338.987679 3 7 7 7 17 0.49 3507 2400 0.09 50 0 0 0 -nan 0 0 0 0 0 0 13 7 61 1331 0 0.00 0.00 0.11 99.75 0.40
usec Time_Of_Day_Seconds Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI LLCkRPS LLC%hit POLL- POLL C1- C1 C1+ C1E- C1E C1E+ C6- C6 C6+ POLL% C1% C1E% C6% CPU%c1 CPU%c6
1824 1764666343.994695 - - - - 16 0.47 3501 2400 0.06 311 0 0 0 -nan 0 0 0 0 0 1 86 36 439 10519 0 0.00 0.00 0.09 99.80 0.23 99.15
169 1764666343.993351 0 0 0 0 21 0.59 3502 2400 0.08 114 0 0 0 -nan 0 0 0 0 0 0 52 29 83 1355 0 0.00 0.00 0.49 99.32 0.58 98.70
93 1764666343.993469 0 4 1 1 16 0.46 3497 2400 0.05 20 0 0 0 -nan 0 0 0 0 0 0 7 1 61 1315 0 0.00 0.00 0.04 99.86 0.58
139 1764666343.993843 1 1 2 2 17 0.47 3503 2400 0.05 60 0 0 0 -nan 0 0 0 0 0 0 5 0 68 1332 0 0.00 0.00 0.03 99.85 0.10 99.30
95 1764666343.993969 1 5 3 3 15 0.44 3501 2400 0.05 11 0 0 0 -nan 0 0 0 0 0 0 3 1 39 1293 0 0.00 0.00 0.03 99.88 0.10
103 1764666343.994201 2 2 4 4 17 0.48 3499 2400 0.06 67 0 0 0 -nan 0 0 0 0 0 1 10 3 94 1351 0 0.00 0.00 0.07 99.80 0.14 99.26
92 1764666343.994334 2 6 5 5 15 0.42 3497 2400 0.05 7 0 0 0 -nan 0 0 0 0 0 0 1 0 57 1314 0 0.00 0.00 0.00 99.91 0.14
107 1764666343.994572 3 3 6 6 15 0.44 3502 2400 0.05 21 0 0 0 -nan 0 0 0 0 0 0 6 1 19 1280 0 0.00 0.00 0.05 99.86 0.09 99.33
95 1764666343.994695 3 7 7 7 16 0.44 3504 2400 0.07 11 0 0 0 -nan 0 0 0 0 0 0 2 1 18 1279 0 0.00 0.00 0.02 99.88 0.09
usec Time_Of_Day_Seconds Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI LLCkRPS LLC%hit POLL- POLL C1- C1 C1+ C1E- C1E C1E+ C6- C6 C6+ POLL% C1% C1E% C6% CPU%c1 CPU%c6
1754 1764666349.001690 - - - - 17 0.48 3500 2400 0.06 430 0 0 0 -nan 0 0 0 0 0 0 87 39 532 10614 0 0.00 0.00 0.09 99.79 0.22 99.15
146 1764666349.000359 0 0 0 0 18 0.52 3498 2400 0.06 69 0 0 0 -nan 0 0 0 0 0 0 5 5 74 1344 0 0.00 0.00 0.07 99.80 0.16 99.19
96 1764666349.000500 0 4 1 1 17 0.47 3499 2400 0.05 32 0 0 0 -nan 0 0 0 0 0 0 6 2 62 1315 0 0.00 0.00 0.04 99.85 0.16
128 1764666349.000765 1 1 2 2 17 0.48 3502 2400 0.06 59 0 0 0 -nan 0 0 0 0 0 0 1 0 72 1338 0 0.00 0.00 0.00 99.87 0.49 98.83
95 1764666349.000902 1 5 3 3 18 0.52 3505 2400 0.07 99 0 0 0 -nan 0 0 0 0 0 0 58 27 64 1324 0 0.00 0.00 0.46 99.37 0.49
112 1764666349.001167 2 2 4 4 17 0.48 3498 2400 0.06 73 0 0 0 -nan 0 0 0 0 0 0 6 2 89 1346 0 0.00 0.00 0.05 99.82 0.11 99.29
93 1764666349.001306 2 6 5 5 15 0.43 3498 2400 0.05 16 0 0 0 -nan 0 0 0 0 0 0 1 0 57 1314 0 0.00 0.00 0.00 99.91 0.11
108 1764666349.001574 3 3 6 6 17 0.48 3502 2400 0.06 61 0 0 0 -nan 0 0 0 0 0 0 6 2 74 1332 0 0.00 0.00 0.04 99.83 0.10 99.27
90 1764666349.001690 3 7 7 7 16 0.45 3503 2400 0.07 21 0 0 0 -nan 0 0 0 0 0 0 4 1 40 1301 0 0.00 0.00 0.02 99.88 0.10
usec Time_Of_Day_Seconds Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI LLCkRPS LLC%hit POLL- POLL C1- C1 C1+ C1E- C1E C1E+ C6- C6 C6+ POLL% C1% C1E% C6% CPU%c1 CPU%c6
1978 1764666354.008912 - - - - 17 0.48 3499 2400 0.06 410 0 0 0 -nan 0 0 0 0 0 0 108 43 556 10701 0 0.00 0.00 0.11 99.77 0.26 99.09
141 1764666354.007538 0 0 0 0 20 0.56 3499 2400 0.06 100 0 0 0 -nan 0 0 0 0 0 0 45 22 65 1341 0 0.00 0.00 0.40 99.44 0.46 98.83
102 1764666354.007684 0 4 1 1 17 0.50 3497 2400 0.05 55 0 0 0 -nan 0 0 0 0 0 0 4 1 73 1328 0 0.00 0.00 0.04 99.84 0.46
135 1764666354.007989 1 1 2 2 16 0.46 3499 2400 0.06 44 0 0 0 -nan 0 0 0 0 0 0 5 1 51 1314 0 0.00 0.00 0.03 99.86 0.20 99.18
111 1764666354.008132 1 5 3 3 16 0.47 3499 2400 0.05 46 0 0 0 -nan 0 0 0 0 0 0 25 8 40 1296 0 0.00 0.00 0.16 99.73 0.20
107 1764666354.008362 2 2 4 4 18 0.51 3501 2400 0.07 80 0 0 0 -nan 0 0 0 0 0 0 14 6 141 1411 0 0.00 0.00 0.14 99.73 0.24 99.12
97 1764666354.008502 2 6 5 5 16 0.45 3499 2400 0.05 20 0 0 0 -nan 0 0 0 0 0 0 3 0 117 1379 0 0.00 0.00 0.02 99.89 0.24
109 1764666354.008776 3 3 6 6 17 0.48 3501 2400 0.06 47 0 0 0 -nan 0 0 0 0 0 0 6 1 41 1325 0 0.00 0.00 0.04 99.85 0.15 99.22
97 1764666354.008912 3 7 7 7 16 0.46 3500 2400 0.07 18 0 0 0 -nan 0 0 0 0 0 0 6 4 28 1307 0 0.00 0.00 0.08 99.82 0.15
```
________________________________________
From: Len Brown <lenb@...nel.org>
Sent: Monday, December 1, 2025 8:14 PM
To: Ehlert, Emily
Cc: Zhang, Rui; linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org; Emily Ehlert
Subject: RE: [EXTERNAL] [PATCH 2/2] tools/power/turbostat: Fix division by zero when TDP calculation fails
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
> I'll send you a patch for this later today.
Please try the latest turbostat in my public tree:
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
The top commit should be this:
commit 4b295ae45d3e6eb4d811c8fc2408b9e4e91c9474 (turbostat, next)
Author: Len Brown <len.brown@...el.com>
Date: Sun Nov 30 00:11:22 2025 -0500
tools/power turbostat: Validate that RAPL MSRs really exist
Even though the platform->plat_rapl_msrs enumeration may be accurate,
a VM may deny access to the underlying MSRs.
Probe if PKG_ENERGY is readable and non-zero.
If no, ignore all RAPL MSRs.
Reported-by: Emily Ehlert <ehemily@...zon.de>
Signed-off-by: Len Brown <len.brown@...el.com>
Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Christof Hellmis
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Powered by blists - more mailing lists