1
0
Fork 0
alistair23-linux/include
Ulf Hansson 6f9b83ac87 cpuidle: Export the next timer expiration for CPUs
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>
2019-04-10 00:32:34 +02:00
..
acpi ACPI: use different default debug value than ACPICA 2019-03-25 10:45:59 +01:00
asm-generic kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
clocksource clocksource/arm_arch_timer: Store physical timer IRQ number for KVM on VHE 2019-02-19 21:05:22 +00:00
crypto crypto: export arc4 defines 2019-02-15 13:21:55 +08:00
drm drm i915, amdgpu, qxl and etnaviv fixes 2019-03-15 13:58:35 -07:00
dt-bindings We have a fairly balanced mix of clk driver updates and clk framework 2019-03-14 08:46:17 -07:00
keys Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-03-10 17:32:04 -07:00
kvm ARM: some cleanups, direct physical timer assignment, cache sanitization 2019-03-15 15:00:28 -07:00
linux cpuidle: Export the next timer expiration for CPUs 2019-04-10 00:32:34 +02:00
math-emu
media media: include: fix several typos 2019-03-01 09:45:52 -05:00
memory
misc auxdisplay: charlcd: Introduce charlcd_free() helper 2019-03-17 08:48:16 +01:00
net net/sched: let actions use RCU to access 'goto_chain' 2019-03-21 13:26:42 -07:00
pcmcia
ras
rdma RDMA: Handle ucontext allocations by IB/core 2019-02-22 14:11:37 -07:00
scsi scsi: kill command serial number 2019-02-27 09:19:24 -05:00
soc IOMMU Updates for Linux v5.1 2019-03-10 12:29:52 -07:00
sound sound fixes for 5.1-rc1 2019-03-15 14:05:00 -07:00
target scsi: target/iscsi: Rename a function and a function pointer 2019-02-04 21:34:49 -05:00
trace NFS client bugfixes for Linux 5.1 2019-03-16 12:28:18 -07:00
uapi A collection of x86 and ARM bugfixes, and some improvements to documentation. 2019-03-31 08:55:59 -07:00
video media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
xen x86/xen: dont add memory above max allowed allocation 2019-02-18 06:52:51 +01:00