]> Gentwo Git Trees - linux/.git/commit
arm64: support cpuidle-haltpoll
authorAnkur Arora <ankur.a.arora@oracle.com>
Wed, 25 Sep 2024 23:24:25 +0000 (16:24 -0700)
committerChristoph Lameter <cl@gentwo.org>
Wed, 9 Oct 2024 02:06:43 +0000 (19:06 -0700)
commitd1b4470b0b7e5f6944772dc70e65b69d8bab581f
tree4db196f8079cb4499c7002831d31a67f6846f787
parent18c1bfad07bf4edf93d0daf924493307f3422733
arm64: support cpuidle-haltpoll

Add architectural support for the cpuidle-haltpoll driver by defining
arch_haltpoll_*(). Also define ARCH_CPUIDLE_HALTPOLL to allow
cpuidle-haltpoll to be selected.

Haltpoll uses poll_idle() to do the actual polling. This in turn
uses smp_cond_load*() to wait until there's a specific store to
a cacheline.
In the edge case -- no stores to the cacheline and no interrupt --
the event-stream provides the terminating condition ensuring we
don't wait forever. But because the event-stream runs at a fixed
frequency (configured at 10kHz) haltpoll might spend more time in
the polling stage than specified by cpuidle_poll_time().

This would only happen in the last iteration, since overshooting the
poll_limit means the governor will move out of the polling stage.

Tested-by: Haris Okanovic <harisokn@amazon.com>
Tested-by: Misono Tomohiro <misono.tomohiro@fujitsu.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Reviewed-by: Haris Okanovic <harisokn@amazon.com>
arch/arm64/Kconfig
arch/arm64/include/asm/cpuidle_haltpoll.h [new file with mode: 0644]