]> 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)
commit5e940f668504e35d8ebbbf22758758a253203baa
treef9cce0250542413537d76ba0d5c66d49091e4242
parent81e5bb7fced631b6b2619d074b5db8220cedcc4e
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