On Fri, 22 May 2020, Naveen Krishna Ch wrote: > > This version looks ok, and it looks like there are no more > > unexpected counter wraps either. Series applied to hwmon-next. > > Thank you for your guidance and support. Thank you, looking forward to using this driver. Meanwhile, I have a couple of questions about AMD RAPL counters. The documentation says the PKG_ENERGY_STAT MSR is instantiated per CCD and L3 complex, implying that energy is accumulated for 3 or 4 cores in an L3 complex. However your patch reads that MSR per socket, and from testing on my Ryzen 4500U CPU I can confirm that the MSR gives the same value when accessed from each core. Therefore I think your code is correct and the documentation is wrong, can you confirm? Next, I'm seeing paradoxical results when attempting to test accuracy of the counters. When running an AVX workload on 6 cores, I see CORE_ENERGY_STAT MSR reporting values just above 9 Watts per core, with 55 Watts in total, and yet PKG_ENERGY_STAT reporting only 30 Watts. This is clearly a contradiction since package energy must be at least the sum of core energy readings. Furthermore, this is happening on a 18 W CPU in a laptop, which definitely cannot sustain 55 Watts, and even 30 Watts seems too high. Can you clarify how the counters work and under what conditions they give accurate readings? Thanks. Alexander