The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Qais Yousef <qyousef@layalina.io>,
	Kajetan Puchalski <kajetan.puchalski@arm.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Vincent Donnefort <vdonnefort@google.com>,
	Quentin Perret <qperret@google.com>,
	Abhijeet Dharmapurikar <adharmap@quicinc.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting'
Date: Fri, 12 May 2023 13:32:32 +0200	[thread overview]
Message-ID: <20230512113232.GX4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20230512101029.342823-3-dietmar.eggemann@arm.com>

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.



  parent reply	other threads:[~2023-05-12 11:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 10:10 [PATCH v2 0/2] sched: Consider CPU contention in frequency, EAS max util & load-balance busiest CPU selection Dietmar Eggemann
2023-05-12 10:10 ` [PATCH v2 1/2] sched/fair: Refactor CPU utilization functions Dietmar Eggemann
2023-05-12 10:10 ` [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting' Dietmar Eggemann
2023-05-12 11:22   ` Peter Zijlstra
2023-05-12 14:39     ` Dietmar Eggemann
2023-05-13  9:32       ` Peter Zijlstra
2023-05-12 11:32   ` Peter Zijlstra [this message]
2023-05-12 14:39     ` Dietmar Eggemann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230512113232.GX4253@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=adharmap@quicinc.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=kajetan.puchalski@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=qperret@google.com \
    --cc=qyousef@layalina.io \
    --cc=vdonnefort@google.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox