Thread (32 messages) 32 messages, 4 authors, 2025-01-21
STALE545d
Revisions (2)
  1. v9 current
  2. v10 [diff vs current]

[PATCH v9 07/15] arm64: add support for polling in idle

From: Ankur Arora <hidden>
Date: 2024-11-07 19:09:21
Also in: kvm, linux-arch, linux-pm, lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

Polling in idle with poll_idle() needs TIF_POLLING_NRFLAG support,
and a cheap mechanism to do the actual polling via
smp_cond_load_relaxed_timeout().

Both of these are present on arm64. So, select ARCH_HAS_OPTIMIZED_POLL
to enable it.

Enabling this should help reduce the cost of remote wakeups, since if
the target sets TIF_POLLING_NRFLAG (as it does while polling in idle),
the scheduler does those just by setting the need-resched bit. This
contrasts with sending an IPI, and incurring the cost of handling the
interrupt on the receiver.

Signed-off-by: Ankur Arora <redacted>
---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fd9df6dcc593..43762c68e357 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -38,6 +38,7 @@ config ARM64
 	select ARCH_HAS_MEM_ENCRYPT
 	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
 	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
+	select ARCH_HAS_OPTIMIZED_POLL
 	select ARCH_HAS_PTE_DEVMAP
 	select ARCH_HAS_PTE_SPECIAL
 	select ARCH_HAS_HW_PTE_YOUNG
-- 
2.43.5

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help