]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit008d396eb219ee5a1c98c9ef01c35752d35f0d6c
treef9cce0250542413537d76ba0d5c66d49091e4242
parent96e4715857cf184536ef46e6ea92465f58a7b12d
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