summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-01-14 22:45:30 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-01-23 23:50:38 +0300
commit475ca3470b3739150720f1b285646de38103e7b7 (patch)
treeecc8ea6068d6dbfb4605f722497d55f439ec82fd
parent60836533b4c7b69e6cb815c87f089e39c2878acd (diff)
downloadlinux-475ca3470b3739150720f1b285646de38103e7b7.tar.xz
cpuidle: governors: teo: Refine tick_intercepts vs total events check
Use 2/3 as the proportion coefficient in the check comparing cpu_data->tick_intercepts with cpu_data->total because it is close enough to the current one (5/8) and it allows of more straightforward interpretation (on average, intercepts within the tick period length are twice as frequent as other events). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/10793374.nUPlyArG6x@rafael.j.wysocki
-rw-r--r--drivers/cpuidle/governors/teo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
index 5434584af040..750ab0678a77 100644
--- a/drivers/cpuidle/governors/teo.c
+++ b/drivers/cpuidle/governors/teo.c
@@ -485,7 +485,7 @@ constraint:
* total wakeup events, do not stop the tick.
*/
if (drv->states[idx].target_residency_ns < TICK_NSEC &&
- cpu_data->tick_intercepts > cpu_data->total / 2 + cpu_data->total / 8)
+ 3 * cpu_data->tick_intercepts >= 2 * cpu_data->total)
duration_ns = TICK_NSEC / 2;
end: