]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools/power turbostat: KNL workaround for %Busy and Avg_MHz
authorHubert Chrzaniuk <hubert.chrzaniuk@intel.com>
Mon, 14 Sep 2015 11:31:00 +0000 (13:31 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Mon, 16 Jan 2017 20:10:58 +0000 (15:10 -0500)
commit194c0148ec0ec07580a9d1ce22bb8ee5ef42310e
tree18022db9f011e340fee5235b320ea26810ccb728
parent9d26341f6f790028dc48394dcf22d2946ee4ee97
tools/power turbostat: KNL workaround for %Busy and Avg_MHz

Orabug: 24811361

KNL increments APERF and MPERF every 1024 clocks.
This is compliant with the architecture specification,
which requires that only the ratio of APERF/MPERF need be valid.

However, turbostat takes advantage of the fact that these
two MSRs increment every un-halted clock
at the actual and base frequency:

AVG_MHz = APERF_delta/measurement_interval

%Busy = MPERF_delta/TSC_delta

This quirk is needed for these calculations to also work on KNL,
which would otherwise show a value 1024x smaller than expected.

Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from commit b2b34dfe4d9aa4c468fc363b3b666974783ed1f9)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
tools/power/x86/turbostat/turbostat.c