linux/drivers/cpuidle/governors
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
..
gov.h cpuidle: menu: Skip tick_nohz_get_sleep_length() call in some cases 2023-08-17 11:28:38 +02:00
haltpoll.c cpuidle: haltpoll: do not shrink guest poll_limit_ns below grow_start 2024-02-12 17:02:51 +01:00
ladder.c cpuidle: ladder: fix ladder_do_selection() kernel-doc 2024-05-07 13:54:58 +02:00
Makefile cpuidle: add haltpoll governor 2019-07-30 17:27:37 +02:00
menu.c cpuidle: menu: Cleanup after loadavg removal 2024-06-07 20:55:00 +02:00
teo.c cpuidle: teo: Don't count non-existent intercepts 2024-07-01 18:58:55 +02:00