Commit 81fc7e1
tools/power turbostat: Allow Zero return value for some RAPL registers
[ Upstream commit b312d88 ]
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 <artem.bityutskiy@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 58190b5 commit 81fc7e1
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 | | |
| |||
7896 | 7905 | | |
7897 | 7906 | | |
7898 | 7907 | | |
7899 | | - | |
| 7908 | + | |
7900 | 7909 | | |
7901 | 7910 | | |
7902 | 7911 | | |
| |||
8034 | 8043 | | |
8035 | 8044 | | |
8036 | 8045 | | |
8037 | | - | |
| 8046 | + | |
8038 | 8047 | | |
8039 | 8048 | | |
8040 | 8049 | | |
| |||
8148 | 8157 | | |
8149 | 8158 | | |
8150 | 8159 | | |
8151 | | - | |
| 8160 | + | |
8152 | 8161 | | |
8153 | 8162 | | |
8154 | 8163 | | |
| |||
0 commit comments