[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <97c43712-f201-4565-92d1-f28af9da8ae8@arm.com>
Date: Fri, 17 Jan 2025 11:27:48 +0100
From: Pierre Gondois <pierre.gondois@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
vschneid@...hat.com, lukasz.luba@....com, rafael.j.wysocki@...el.com,
linux-kernel@...r.kernel.org
Cc: qyousef@...alina.io, hongyan.xia2@....com, christian.loehle@....com,
qperret@...gle.com
Subject: Re: [PATCH 7/7 v2] sched/fair: Update overutilized detection
Hello Vincent,
On 12/17/24 17:07, Vincent Guittot wrote:
> Checking uclamp_min is useless and counterproductive for overutilized state
> as misfit can now happen without being in overutilized state
Before this patch a task was misfit if:
!task_fits_cpu(p, cpu)
This is, if either:
- task_util > 80% * CPU_capacity
- task_UCLAMP_MIN > get_actual_cpu_capacity(cpu)
A CPU was OU if:
!util_fits_cpu(cpu_util_cfs(cpu), rq_util_min, rq_util_max, cpu)
This is:
- CPU_util > 80% * CPU_capacity
This should be the same after this patch. Just to be sure I understand correctly,
this patch has no functional change and is independent from this serie right ?
>
> Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
> 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 9bddb094ee21..9eb4c4946ddc 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6870,16 +6870,15 @@ static inline void hrtick_update(struct rq *rq)
> #ifdef CONFIG_SMP
> 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);
> }
>
> /*
Powered by blists - more mailing lists