Commit b312d88
tools/power turbostat: Allow Zero return value for some RAPL registers
turbostat aborted with below messages on a dual-package system,
turbostat: turbostat.c:3744: rapl_counter_accumulate: Assertion `dst->unit == src->unit' failed.
Aborted
This is because
1. the MSR_DRAM_PERF_STATUS returns Zero for one package, and non-Zero
for another package
2. probe_msr() treats Zero return value as a failure so this feature is
enabled on one package, and disabled for another package.
3. turbostat aborts because the feature is invalid on some package
Unlike the RAPL energy counter registers, MSR_DRAM_PERF_STATUS can
return Zero value, and this should not be treated as a failure.
Fix the problem by allowing Zero return value for RAPL registers other
than the energy counters.
Fixes: 7c6fee2 ("tools/power turbostat: Check for non-zero value when MSR probing")
Reported-by: Artem Bityutskiy <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Signed-off-by: Len Brown <[email protected]>1 parent 1c7c738 commit b312d88
1 file changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2211 | 2211 | | |
2212 | 2212 | | |
2213 | 2213 | | |
2214 | | - | |
| 2214 | + | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
| |||
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
| 2223 | + | |
| 2224 | + | |
2228 | 2225 | | |
2229 | 2226 | | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
2230 | 2239 | | |
2231 | 2240 | | |
2232 | 2241 | | |
| |||
7907 | 7916 | | |
7908 | 7917 | | |
7909 | 7918 | | |
7910 | | - | |
| 7919 | + | |
7911 | 7920 | | |
7912 | 7921 | | |
7913 | 7922 | | |
| |||
8045 | 8054 | | |
8046 | 8055 | | |
8047 | 8056 | | |
8048 | | - | |
| 8057 | + | |
8049 | 8058 | | |
8050 | 8059 | | |
8051 | 8060 | | |
| |||
8159 | 8168 | | |
8160 | 8169 | | |
8161 | 8170 | | |
8162 | | - | |
| 8171 | + | |
8163 | 8172 | | |
8164 | 8173 | | |
8165 | 8174 | | |
| |||
0 commit comments