]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: use tsc_tweak everwhere it is needed
authorLen Brown <len.brown@intel.com>
Fri, 10 Feb 2017 05:29:51 +0000 (00:29 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 1 Mar 2017 05:14:13 +0000 (00:14 -0500)
commitb9f74c7b6fd95da2480ec7b0ed23c56ac34ac919
treef9cce0250542413537d76ba0d5c66d49091e4242
parent339a602dbcd40ba5446e92de2cf4bcedb602ae48
tools/power turbostat: use tsc_tweak everwhere it is needed

The CPU ticks at a rate in the "bus clock" domain.
eg. 100 MHz * bus_ratio.

On newer processors, the TSC has been moved out of this BCLK
domain and into a separate crystal-clock domain.

While the TSC ticks "close to" the base frequency, those that look
closely at the numbers will notice small errors in calculations that
mix units of TSC clocks and bus clocks.

"tsc_tweak" was introduced to address the most visible
mixing -- the %Busy and the the Busy_MHz calculations.
(A simplification as since removed TSC from the BusyMHz calculation)

Here we apply the tsc_tweak to everyplace where BCLK
and TSC units are mixed.  The results is that
on a system which is 100% idle, the sum of the C-states
are now much more likely to be closer to 100%.

Reported-by: Travis Downs <travis.downs@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c