]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitff969c0f9c6c8346d573b16cb969acb22a3bb557
tree27f6c7625fc2baf59e660fe744a842a4ef44d1d4
parent9cac21de341f330846d0c6ae8356a840009821a6
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