public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vincent Donnefort <vdonnefort@google.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: peterz@infradead.org, mingo@redhat.com,
	vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
	morten.rasmussen@arm.com, chris.redpath@arm.com,
	qperret@google.com, tao.zhou@linux.dev, kernel-team@android.com
Subject: Re: [PATCH v9 6/7] sched/fair: Remove task_util from effective utilization in feec()
Date: Mon, 6 Jun 2022 10:32:17 +0100	[thread overview]
Message-ID: <Yp3JodkEgYUsQ4EV@google.com> (raw)
In-Reply-To: <d91ffb42-4440-7c07-6a87-3cce9fa3dcab@arm.com>

On Tue, May 31, 2022 at 10:17:01AM +0200, Dietmar Eggemann wrote:
> - Vincent Donnefort <vincent.donnefort@arm.com>
> 
> On 23/05/2022 17:51, Vincent Donnefort wrote:
> > From: Vincent Donnefort <vincent.donnefort@arm.com>
> 
> [...]
> 
> > @@ -6834,22 +6887,36 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
> >  	if (!task_util_est(p))
> >  		goto unlock;
> >  
> > +	eenv_task_busy_time(&eenv, p, prev_cpu);
> > +
> >  	for (; pd; pd = pd->next) {
> > -		unsigned long cur_delta, spare_cap, max_spare_cap = 0;
> > +		unsigned long cpu_cap, cpu_thermal_cap, util;
> > +		unsigned long cur_delta, max_spare_cap = 0;
> >  		bool compute_prev_delta = false;
> >  		unsigned long base_energy_pd;
> >  		int max_spare_cap_cpu = -1;
> >  
> >  		cpumask_and(cpus, perf_domain_span(pd), cpu_online_mask);
> 
> Internal EAS testing of this patch-set version has revealed that this
> doesn't work against LTP CPU hotplug stress test. `struct cpumask *cpus`
> can't be used when it is empty. This can happen in case all PD CPUs are
> hotplugged out since we `and` the invariant PD cpumask with
> cpu_online_mask. We need a:
> 
> +               if (cpumask_empty(cpus))
> +                       continue;
> +
> 
> here.

Good catch, thanks for trying the test suite.

> 
> > -		for_each_cpu_and(cpu, cpus, sched_domain_span(sd)) {
> > +		/* Account thermal pressure for the energy estimation */
> > +		cpu = cpumask_first(cpus);
> > +		cpu_thermal_cap = arch_scale_cpu_capacity(cpu);
> > +		cpu_thermal_cap -= arch_scale_thermal_pressure(cpu);
> 
> [...]

  reply	other threads:[~2022-06-06  9:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 15:51 [PATCH v9 0/7] feec() energy margin removal Vincent Donnefort
2022-05-23 15:51 ` [PATCH v9 1/7] sched/fair: Provide u64 read for 32-bits arch helper Vincent Donnefort
2022-05-23 15:51 ` [PATCH v9 2/7] sched/fair: Decay task PELT values during wakeup migration Vincent Donnefort
2022-05-30 16:31   ` Vincent Guittot
2022-05-31  8:16   ` Dietmar Eggemann
2022-06-06  9:31     ` Vincent Donnefort
2022-06-07  6:57       ` Vincent Guittot
2022-06-07 10:03         ` Vincent Donnefort
2022-06-07 10:19           ` Vincent Guittot
2022-05-23 15:51 ` [PATCH v9 3/7] sched, drivers: Remove max param from effective_cpu_util()/sched_cpu_util() Vincent Donnefort
2022-05-31  7:59   ` Vincent Guittot
2022-05-23 15:51 ` [PATCH v9 4/7] sched/fair: Rename select_idle_mask to select_rq_mask Vincent Donnefort
2022-06-02 13:07   ` Vincent Guittot
2022-05-23 15:51 ` [PATCH v9 5/7] sched/fair: Use the same cpumask per-PD throughout find_energy_efficient_cpu() Vincent Donnefort
2022-06-02 13:16   ` Vincent Guittot
2022-05-23 15:51 ` [PATCH v9 6/7] sched/fair: Remove task_util from effective utilization in feec() Vincent Donnefort
2022-05-31  8:17   ` Dietmar Eggemann
2022-06-06  9:32     ` Vincent Donnefort [this message]
2022-06-02 13:58   ` Vincent Guittot
2022-06-06  9:41     ` Vincent Donnefort
2022-06-07  6:59       ` Vincent Guittot
2022-05-23 15:51 ` [PATCH v9 7/7] sched/fair: Remove the energy margin " Vincent Donnefort

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=Yp3JodkEgYUsQ4EV@google.com \
    --to=vdonnefort@google.com \
    --cc=chris.redpath@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=qperret@google.com \
    --cc=tao.zhou@linux.dev \
    --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