alistair23-linux/drivers/cpuidle
Rafael J. Wysocki 45f1ff59e2 cpuidle: Return nohz hint from cpuidle_select()
Add a new pointer argument to cpuidle_select() and to the ->select
cpuidle governor callback to allow a boolean value indicating
whether or not the tick should be stopped before entering the
selected state to be returned from there.

Make the ladder governor ignore that pointer (to preserve its
current behavior) and make the menu governor return 'false" through
it if:
 (1) the idle exit latency is constrained at 0, or
 (2) the selected state is a polling one, or
 (3) the expected idle period duration is within the tick period
     range.

In addition to that, the correction factor computations in the menu
governor need to take the possibility that the tick may not be
stopped into account to avoid artificially small correction factor
values.  To that end, add a mechanism to record tick wakeups, as
suggested by Peter Zijlstra, and use it to modify the menu_update()
behavior when tick wakeup occurs.  Namely, if the CPU is woken up by
the tick and the return value of tick_nohz_get_sleep_length() is not
within the tick boundary, the predicted idle duration is likely too
short, so make menu_update() try to compensate for that by updating
the governor statistics as though the CPU was idle for a long time.

Since the value returned through the new argument pointer of
cpuidle_select() is not used by its caller yet, this change by
itself is not expected to alter the functionality of the code.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2018-04-06 09:29:34 +02:00
..
governors cpuidle: Return nohz hint from cpuidle_select() 2018-04-06 09:29:34 +02:00
coupled.c smp: Avoid using two cache lines for struct call_single_data 2017-08-29 15:14:38 +02:00
cpuidle-arm.c ARM: cpuidle: Drop memory allocation error message from arm_idle_init_cpu() 2018-03-05 12:39:32 +01:00
cpuidle-at91.c
cpuidle-big_little.c
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c Update MIPS email addresses 2017-11-03 09:02:30 -07:00
cpuidle-exynos.c cpuidle: Enable coupled cpuidle support on Exynos3250 platform 2018-03-29 13:06:08 +02:00
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c cpuidle/powernv: avoid double irq enable coming out of idle 2018-01-18 15:43:43 +11:00
cpuidle-pseries.c powerpc/pseries/cpuidle: add polling idle for shared processor guests 2018-01-18 15:43:44 +11:00
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c cpuidle: Return nohz hint from cpuidle_select() 2018-04-06 09:29:34 +02:00
cpuidle.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
driver.c cpuidle: Make drivers initialize polling state 2017-08-30 03:06:33 +02:00
dt_idle_states.c Merge branch 'pm-sleep' 2017-09-04 00:06:02 +02:00
dt_idle_states.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
governor.c cpuidle: Avoid NULL argument in cpuidle_switch_governor() 2018-01-05 14:01:30 +01:00
Kconfig
Kconfig.arm ARM: cpuidle: Support asymmetric idle definition 2017-06-24 01:51:00 +02:00
Kconfig.mips cpuidle: cpuidle-cps: Enable use with MIPSr6 CPUs. 2016-10-04 16:13:57 +02:00
Kconfig.powerpc
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
poll_state.c cpuidle: poll_state: Avoid invoking local_clock() too often 2018-03-29 13:06:08 +02:00
sysfs.c PM: cpuidle/suspend: Add s2idle usage and time state attributes 2018-03-29 13:06:08 +02:00