cpufreq: governor: Fix nice contribution computation in dbs_check_cpu()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Feb 2016 01:15:50 +0000 (02:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:41:03 +0000 (14:41 +0100)
commit679b8fe43a6b723787cae1d9599ed776d7ce238b
tree27f6c7625fc2baf59e660fe744a842a4ef44d1d4
parente4db2813d2e558b6b6bee464308678a57732b390
cpufreq: governor: Fix nice contribution computation in dbs_check_cpu()

The contribution of the CPU nice time to the idle time in dbs_check_cpu()
is computed in a bogus way, as the code may subtract current and previous
nice values for different CPUs.

That doesn't matter for cases when cpufreq policies are not shared,
but may lead to problems otherwise.

Fix the computation and simplify it to avoid taking unnecessary steps.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq_governor.c