mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
6f9b83ac87
To be able to predict the sleep duration for a CPU entering idle, it is essential to know the expiration time of the next timer. Both the teo and the menu cpuidle governors already use this information for CPU idle state selection. Moving forward, a similar prediction needs to be made for a group of idle CPUs rather than for a single one and the following changes implement a new genpd governor for that purpose. In order to support that feature, add a new function called tick_nohz_get_next_hrtimer() that will return the next hrtimer expiration time of a given CPU to be invoked after deciding whether or not to stop the scheduler tick on that CPU. Make the cpuidle core call tick_nohz_get_next_hrtimer() right before invoking the ->enter() callback provided by the cpuidle driver for the given state and store its return value in the per-CPU struct cpuidle_device, so as to make it available to code outside of cpuidle. Note that at the point when cpuidle calls tick_nohz_get_next_hrtimer(), the governor's ->select() callback has already returned and indicated whether or not the tick should be stopped, so in fact the value returned by tick_nohz_get_next_hrtimer() always is the next hrtimer expiration time for the given CPU, possibly including the tick (if it hasn't been stopped). Co-developed-by: Lina Iyer <lina.iyer@linaro.org> Co-developed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
---|---|---|
.. | ||
governors | ||
coupled.c | ||
cpuidle-arm.c | ||
cpuidle-at91.c | ||
cpuidle-big_little.c | ||
cpuidle-calxeda.c | ||
cpuidle-clps711x.c | ||
cpuidle-cps.c | ||
cpuidle-exynos.c | ||
cpuidle-kirkwood.c | ||
cpuidle-mvebu-v7.c | ||
cpuidle-powernv.c | ||
cpuidle-pseries.c | ||
cpuidle-ux500.c | ||
cpuidle-zynq.c | ||
cpuidle.c | ||
cpuidle.h | ||
driver.c | ||
dt_idle_states.c | ||
dt_idle_states.h | ||
governor.c | ||
Kconfig | ||
Kconfig.arm | ||
Kconfig.mips | ||
Kconfig.powerpc | ||
Makefile | ||
poll_state.c | ||
sysfs.c |