]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Add genpd governor for CPUs
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 11 Apr 2019 18:17:33 +0000 (20:17 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 11 Apr 2019 20:41:01 +0000 (22:41 +0200)
commit085827de7a315501dbff2eac289b7c5a0058af52
tree21a438c3d74d5e048189cd4b7e72c63c71ce716c
parent9af0692a2e992cc83b7e4f11d87740177fe50119
PM / Domains: Add genpd governor for CPUs

After some preceding changes, PM domains managed by genpd may contain
CPU devices, so idle state residency values should be taken into
account during the state selection process. [The residency value is
the minimum amount of time to be spent by a CPU (or a group of CPUs)
in an idle state in order to save more energy than could be saved
by picking up a shallower idle state.]

For this purpose, add a new genpd governor, pm_domain_cpu_gov, to be
used for selecting idle states of PM domains with CPU devices attached
either directly or through subdomains.

The new governor computes the minimum expected idle duration for all
online CPUs attached to a PM domain and its subdomains.  Next, it
finds the deepest idle state whose target residency is within the
expected idle duration and selects it as the target idle state of
the domain.

It should be noted that the minimum expected idle duration computation
is based on the closest timer event information stored in the per-CPU
variables cpuidle_devices for all of the CPUs in the domain.  That
needs to be revisited in future, as obviously there are other reasons
why a CPU may be woken up from idle.

Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain_governor.c
include/linux/pm_domain.h