tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast
authorWill Deacon <will@kernel.org>
Mon, 24 May 2021 22:18:16 +0000 (23:18 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 May 2021 15:04:45 +0000 (17:04 +0200)
commitc94a8537df12708cc03da9120c3c3561ae744ce1
treea3d59a3f9da19632708e5bdf3a29d2e0729ab4be
parente5007c288e7981e0b0cf8ea3dea443f0b8c34345
tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast

Some SoCs have two per-cpu timer implementations where the timer with the
higher rating stops in deep idle (i.e. suffers from CLOCK_EVT_FEAT_C3STOP)
but is otherwise preferable to the timer with the lower rating. In such a
design, selecting the higher rated devices relies on a global broadcast
timer and IPIs to wake up from deep idle states.

To avoid the reliance on a global broadcast timer and also to reduce the
overhead associated with the IPI wakeups, extend
tick_install_broadcast_device() to manage per-cpu wakeup timers separately
from the broadcast device.

For now, these timers remain unused.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210524221818.15850-4-will@kernel.org
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-internal.h