Re: [PATCH] sched/fair: Update overutilized detection
From: Christian Loehle
Date: Fri Feb 13 2026 - 07:48:39 EST
On 2/13/26 10:17, Vincent Guittot wrote:
> Checking uclamp_min is useless and counterproductive for overutilized state
> as misfit can now happen without being in overutilized state.
I'd remove the "now" since it's been a while...
Also the title could be more specific and include "uclamp_min"
>
> Since commit e5ed0550c04c ("sched/fair: unlink misfit task from cpu overutilized")
> util_fits_cpu returns -1 when uclamp_min is above capacity which is not
> considered as cpu overutilized.
>
> Remove the useless rq_util_min parameter.
>
> Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> Reviewed-by: Qais Yousef <qyousef@xxxxxxxxxxx>
Reviewed-by: Christian Loehle <christian.loehle@xxxxxxx>
> ---
> kernel/sched/fair.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c16b5fd71b2d..fdc4303ca83a 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6776,16 +6776,15 @@ static inline void hrtick_update(struct rq *rq)
>
> static inline bool cpu_overutilized(int cpu)
> {
> - unsigned long rq_util_min, rq_util_max;
> + unsigned long rq_util_max;
>
> if (!sched_energy_enabled())
> return false;
>
> - rq_util_min = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MIN);
> rq_util_max = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MAX);
>
> /* Return true only if the utilization doesn't fit CPU's capacity */
> - return !util_fits_cpu(cpu_util_cfs(cpu), rq_util_min, rq_util_max, cpu);
> + return !util_fits_cpu(cpu_util_cfs(cpu), 0, rq_util_max, cpu);
> }
>
> /*