[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f32d40ff-dc1d-4c37-a607-77dd9423ec91@arm.com>
Date: Wed, 21 Jan 2026 13:34:46 +0000
From: Christian Loehle <christian.loehle@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Doug Smythies <dsmythies@...us.net>
Subject: Re: [PATCH v1 2/5] cpuidle: governors: teo: Avoid fake intercepts
produced by tick
On 1/14/26 19:44, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Tick wakeups can lead to fake intercepts that may skew idle state
> selection towards shallow states, so it is better to avoid counting
> them as intercepts.
>
> For this purpose, add a check causing teo_update() to only count
> tick wakeups as intercepts if intercepts within the tick period
> range are at least twice as frequent as any other events.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> drivers/cpuidle/governors/teo.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> --- a/drivers/cpuidle/governors/teo.c
> +++ b/drivers/cpuidle/governors/teo.c
> @@ -239,6 +239,17 @@ static void teo_update(struct cpuidle_dr
> cpu_data->state_bins[drv->state_count-1].hits += PULSE;
> return;
> }
> + /*
> + * If intercepts within the tick period range are not frequent
> + * enough, count this wakeup as a hit, since it is likely that
> + * the tick has woken up the CPU because an expected intercept
> + * was not there. Otherwise, one of the intercepts may have
> + * been incidentally preceded by the tick wakeup.
> + */
> + if (3 * cpu_data->tick_intercepts < 2 * total) {
> + cpu_data->state_bins[idx_timer].hits += PULSE;
> + return;
> + }
> }
Reviewed-by: Christian Loehle <christian.loehle@....com>
Makes sense to me, let me try to find something that triggers this (often)
Powered by blists - more mailing lists