linux/drivers/cpuidle
Christian Loehle 4b20b07ce7 cpuidle: teo: Don't count non-existent intercepts
When bailing out early, teo will not query the sleep length anymore
since commit 6da8f9ba5a ("cpuidle: teo:
Skip tick_nohz_get_sleep_length() call in some cases") with an
expected sleep_length_ns value of KTIME_MAX.
This lead to state0 accumulating lots of 'intercepts' because
the actually measured sleep length was < KTIME_MAX, so query the sleep
length instead for teo to recognize if it still is in an
intercept-likely scenario without alternating between the two modes.

Fundamentally we can only do one of the two:
 1. Skip sleep_length_ns query when we think intercept is likely.
 2. Have accurate data if sleep_length_ns is actually intercepted when
we believe it is currently intercepted.

Previously teo did the former while this patch chooses the latter as
the additional time it takes to query the sleep length was found to be
negligible and the variants of option 1 (count all unknowns as misses
or count all unknown as hits) had significant regressions (as misses
had lots of too shallow idle state selections and as hits had terrible
performance in intercept-heavy workloads).

Fixes: 6da8f9ba5a ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases")
Link: https://patch.msgid.link/c40acf72-010f-4a8b-80e4-33f133ba266b@arm.com
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-07-01 18:58:55 +02:00
..
governors cpuidle: teo: Don't count non-existent intercepts 2024-07-01 18:58:55 +02:00
coupled.c cpuidle: Avoid explicit cpumask allocation on stack 2024-04-24 21:23:49 +02:00
cpuidle-arm.c cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle 2023-01-13 11:48:17 +01:00
cpuidle-at91.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
cpuidle-big_little.c cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle 2023-01-13 11:48:17 +01:00
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c
cpuidle-exynos.c
cpuidle-haltpoll.c cpuidle: haltpoll: add missing MODULE_DESCRIPTION() macro 2024-06-14 18:15:38 +02:00
cpuidle-kirkwood.c cpuidle: kirkwood: Convert to platform remove callback returning void 2024-04-23 09:21:48 +02:00
cpuidle-mvebu-v7.c cpuidle: mvebu: Fix duplicate flags assignment 2023-01-18 12:03:54 +01:00
cpuidle-powernv.c powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state 2022-12-06 23:18:19 +11:00
cpuidle-psci-domain.c cpuidle: psci: Update init level to core_initcall() 2024-04-04 13:02:28 +02:00
cpuidle-psci.c cpuidle: psci: Drop superfluous wrappers psci_dt_attach|detach_cpu() 2024-04-04 13:00:39 +02:00
cpuidle-psci.h cpuidle: psci: Drop superfluous wrappers psci_dt_attach|detach_cpu() 2024-04-04 13:00:39 +02:00
cpuidle-pseries.c powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-08-24 22:33:17 +10:00
cpuidle-qcom-spm.c cpuidle: Adjust includes to remove of_device.h 2023-04-13 17:46:35 -05:00
cpuidle-riscv-sbi.c cpuidle: RISC-V: Move few functions to arch/riscv 2024-03-19 17:51:38 -07:00
cpuidle-tegra.c cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle 2023-01-13 11:48:17 +01:00
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c x86/mm: delete unused cpu argument to leave_mm() 2024-02-22 10:24:41 -08:00
cpuidle.h cpuidle: move to use bus_get_dev_root() 2023-03-22 20:25:23 +01:00
driver.c cpuidle: Avoid potential overflow in integer multiplication 2024-02-12 17:07:49 +01:00
dt_idle_genpd.c cpuidle: dt_idle_genpd: Add helper function to remove genpd topology 2023-08-08 16:06:20 +02:00
dt_idle_genpd.h cpuidle: dt_idle_genpd: Add helper function to remove genpd topology 2023-08-08 16:06:20 +02:00
dt_idle_states.c cpuidle: dt: Replace deprecated strncpy() with strscpy() 2023-09-29 14:48:31 -07:00
dt_idle_states.h
governor.c cpuidle: Remove redundant check in cpuidle_switch_governor() 2022-09-03 20:14:51 +02:00
Kconfig cpuidle-haltpoll: select haltpoll governor 2023-01-13 20:50:46 +01:00
Kconfig.arm cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT 2023-02-13 17:15:42 +01:00
Kconfig.mips
Kconfig.powerpc
Kconfig.riscv cpuidle: Add RISC-V SBI CPU idle driver 2022-03-10 09:29:51 -08:00
Makefile cpuidle: Add RISC-V SBI CPU idle driver 2022-03-10 09:29:51 -08:00
poll_state.c cpuidle: Use local_clock_noinstr() 2023-06-05 21:11:09 +02:00
sysfs.c cpuidle: move to use bus_get_dev_root() 2023-03-22 20:25:23 +01:00