]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: governor: Avoid atomic operations in hot paths
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Feb 2016 01:13:42 +0000 (02:13 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Mar 2016 13:41:03 +0000 (14:41 +0100)
commit9cac21de341f330846d0c6ae8356a840009821a6
tree2cd9422569ce684971136492b12323d40c3e0a26
parent03e5c79d8a60ead69cccb157efdf4b13fa2f4711
cpufreq: governor: Avoid atomic operations in hot paths

Rework the handling of work items by dbs_update_util_handler() and
dbs_work_handler() so the former (which is executed in scheduler
paths) only uses atomic operations when absolutely necessary.  That
is, when the policy is shared and dbs_update_util_handler() has
already decided that this is the time to queue up a work item.

In particular, this avoids the atomic ops entirely on platforms where
policy objects are never shared.

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