]> git.baikalelectronics.ru Git - kernel.git/commit
intel_pstate: Change busy calculation to use fixed point math.
authorDirk Brandewie <dirk.j.brandewie@intel.com>
Tue, 25 Feb 2014 18:35:37 +0000 (10:35 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Feb 2014 23:56:49 +0000 (00:56 +0100)
commit7d628be0bb8409f50d5fb961ed23aeed4ac8bb5b
tree3f2b47b1f93f84efa151fd9c5596a3d7238fa080
parent36015fa44e0441bbeed56c62a9c2bc212c51b571
intel_pstate: Change busy calculation to use fixed point math.

Commit 88a1cea6fa (intel_pstate: Take core C0 time into account for
core busy calculation) introduced a regression on some processor SKUs
supported by intel_pstate. This was due to the truncation caused by
using integer math to calculate core busy and C0 percentages.

On a i7-4770K processor operating at 800Mhz going to 100% utilization
the percent busy of the CPU using integer math is 22%, but it actually
is 22.85%.  This value scaled to the current frequency returned 97
which the PID interpreted as no error and did not adjust the P state.

Tested on i7-4770K, i7-2600, i5-3230M.

Fixes: 88a1cea6fa41 (intel_pstate: Take core C0 time into account for core busy calculation)
References: https://lkml.org/lkml/2014/2/19/626
References: https://bugzilla.kernel.org/show_bug.cgi?id=70941
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c