mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Pierre.Gondois@arm.com, linux-kernel@vger.kernel.org,
	xuewen.yan@unisoc.com, qperret@qperret.net
Cc: Lukasz.Luba@arm.com, Vincent.Donnefort@arm.com, mingo@redhat.com,
	peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de, bristot@redhat.com
Subject: Re: [PATCH v2 1/2] sched/fair: Only compute base_energy_pd if necessary
Date: Mon, 3 May 2021 14:52:13 +0200	[thread overview]
Message-ID: <ac10c924-78fc-259c-245d-c7f69f2aa17a@arm.com> (raw)
In-Reply-To: <20210429101948.31224-2-Pierre.Gondois@arm.com>

On 29/04/2021 12:19, Pierre.Gondois@arm.com wrote:
> From: Pierre Gondois <Pierre.Gondois@arm.com>
> 
> find_energy_efficient_cpu() searches the best energy CPU
> to place a task on. To do so, the energy of each performance domain
> (pd) is computed w/ and w/o the task placed in each pd.

s/in each pd/on it ?

> 
> The energy of a pd w/o the task (base_energy_pd) is computed prior
> knowing whether a CPU is available in the pd.
> 
> Move the base_energy_pd computation after looping through the CPUs
> of a pd and only computes it if at least one CPU is available.

s/computes/compute

[...]

> +		if (max_spare_cap_cpu < 0 && !compute_prev_delta)
> +			continue;
> +
> +		/* Compute the 'base' energy of the pd, without @p */
> +		base_energy_pd = compute_energy(p, -1, pd);
> +		base_energy += base_energy_pd;
> +

                /* Evaluate the energy impact of using prev_cpu. */

You agreed on this one during v1 review ;-)

> +		if (compute_prev_delta) {
> +			prev_delta = compute_energy(p, prev_cpu, pd);
> +			prev_delta -= base_energy_pd;
> +			best_delta = min(best_delta, prev_delta);
> +		}
> +
>  		/* Evaluate the energy impact of using this CPU. */

better:

            /* Evaluate the energy impact of using max_spare_cap_cpu. */

'this' has lost its context and people might read it as 'this_cpu' or
smp_processor_id().


> -		if (max_spare_cap_cpu >= 0 && max_spare_cap_cpu != prev_cpu) {
> +		if (max_spare_cap_cpu >= 0) {
>  			cur_delta = compute_energy(p, max_spare_cap_cpu, pd);
>  			cur_delta -= base_energy_pd;
>  			if (cur_delta < best_delta) {
> 

With these minor things sorted:

Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>

  parent reply	other threads:[~2021-05-03 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 10:19 [PATCH v2 0/2] sched/fair: find_energy_efficient_cpu() enhancements Pierre.Gondois
2021-04-29 10:19 ` [PATCH v2 1/2] sched/fair: Only compute base_energy_pd if necessary Pierre.Gondois
2021-04-30 11:03   ` Lukasz Luba
2021-05-03 12:52   ` Dietmar Eggemann [this message]
2021-04-29 10:19 ` [PATCH v2 2/2] sched/fair: Fix negative energy delta in find_energy_efficient_cpu() Pierre.Gondois
2021-04-30 11:13   ` Lukasz Luba
2021-05-03 12:52   ` Dietmar Eggemann
2021-05-04  9:27   ` 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=ac10c924-78fc-259c-245d-c7f69f2aa17a@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=Lukasz.Luba@arm.com \
    --cc=Pierre.Gondois@arm.com \
    --cc=Vincent.Donnefort@arm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qperret@qperret.net \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xuewen.yan@unisoc.com \
    /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

all inboxes | Powered by JetHome®