[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230512113232.GX4253@hirez.programming.kicks-ass.net>
Date: Fri, 12 May 2023 13:32:32 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: Ingo Molnar <mingo@...nel.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Qais Yousef <qyousef@...alina.io>,
Kajetan Puchalski <kajetan.puchalski@....com>,
Morten Rasmussen <morten.rasmussen@....com>,
Vincent Donnefort <vdonnefort@...gle.com>,
Quentin Perret <qperret@...gle.com>,
Abhijeet Dharmapurikar <adharmap@...cinc.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting'
On Fri, May 12, 2023 at 12:10:29PM +0200, Dietmar Eggemann wrote:
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index e3211455b203..3b902f533214 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -155,10 +155,11 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
>
> static void sugov_get_util(struct sugov_cpu *sg_cpu)
> {
> + unsigned long util = cpu_util_cfs(sg_cpu->cpu, 1);
> struct rq *rq = cpu_rq(sg_cpu->cpu);
>
> sg_cpu->bw_dl = cpu_bw_dl(rq);
> - sg_cpu->util = effective_cpu_util(sg_cpu->cpu, cpu_util_cfs(sg_cpu->cpu),
> + sg_cpu->util = effective_cpu_util(sg_cpu->cpu, util,
> FREQUENCY_UTIL, NULL);
> }
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 1220cfbee258..3a10fe5988d6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7355,7 +7362,7 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus,
>
> for_each_cpu(cpu, pd_cpus) {
> struct task_struct *tsk = (cpu == dst_cpu) ? p : NULL;
> - unsigned long util = cpu_util(cpu, p, dst_cpu);
> + unsigned long util = cpu_util(cpu, p, dst_cpu, 1);
> unsigned long cpu_util;
>
> /*
> @@ -10561,7 +10568,7 @@ static struct rq *find_busiest_queue(struct lb_env *env,
> break;
>
> case migrate_util:
> - util = cpu_util_cfs(i);
> + util = cpu_util_cfs(i, 1);
>
> /*
> * Don't try to pull utilization from a CPU with one
When you move that comment from cpu_util_cfs() to cpu_util() please also
add a paragraph about why boost=1 and why these locations, because I'm
sure we're going to be asking ouselves that at some point.
Powered by blists - more mailing lists