Skip to content

Commit 475ca34

Browse files
committed
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
1 parent 6083653 commit 475ca34

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/cpuidle/governors

drivers/cpuidle/governors/teo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
485485
* total wakeup events, do not stop the tick.
486486
*/
487487
if (drv->states[idx].target_residency_ns < TICK_NSEC &&
488-
cpu_data->tick_intercepts > cpu_data->total / 2 + cpu_data->total / 8)
488+
3 * cpu_data->tick_intercepts >= 2 * cpu_data->total)
489489
duration_ns = TICK_NSEC / 2;
490490

491491
end:

0 commit comments

Comments
 (0)