Linux Power Management development
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: rui.zhang@intel.com, amit.kucheria@verdurent.com,
	amit.kachhap@gmail.com, daniel.lezcano@linaro.org,
	viresh.kumar@linaro.org, len.brown@intel.com, pavel@ucw.cz,
	mhiramat@kernel.org, qyousef@layalina.io, wvw@google.com,
	xuewen.yan94@gmail.com, rafael@kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	dietmar.eggemann@arm.com
Subject: Re: [PATCH] PM:EM: fix wrong utilization estimation in em_cpu_energy()
Date: Thu, 4 Apr 2024 12:05:41 +0100	[thread overview]
Message-ID: <7ecd3ec9-6990-4d3e-84ae-d0d3a1cccb78@arm.com> (raw)
In-Reply-To: <20240404104200.1672208-1-vincent.guittot@linaro.org>

Hi Vincent,

On 4/4/24 11:42, Vincent Guittot wrote:
> Commit 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division")
> has added back map_util_perf() in em_cpu_energy() computation which has
> been removed with the rework of scheduler/cpufreq interface.
> This is wrong because sugov_effective_cpu_perf() already takes care of
> mapping the utilization to a performance level.
> 
> Fixes: 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division")
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>   include/linux/energy_model.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
> index 770755df852f..70cd7258cd29 100644
> --- a/include/linux/energy_model.h
> +++ b/include/linux/energy_model.h
> @@ -245,7 +245,6 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
>   	 * max utilization to the allowed CPU capacity before calculating
>   	 * effective performance.
>   	 */
> -	max_util = map_util_perf(max_util);
>   	max_util = min(max_util, allowed_cpu_cap);
>   
>   	/*

LGTM. It was developed in parallel IIRC and that change which removes
the extra margin to the util was lost from my radar. I can see it
landed first.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

Regards,
Lukasz

  reply	other threads:[~2024-04-04 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 10:42 [PATCH] PM:EM: fix wrong utilization estimation in em_cpu_energy() Vincent Guittot
2024-04-04 11:05 ` Lukasz Luba [this message]
2024-04-04 19:05   ` Rafael J. Wysocki

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=7ecd3ec9-6990-4d3e-84ae-d0d3a1cccb78@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=amit.kachhap@gmail.com \
    --cc=amit.kucheria@verdurent.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wvw@google.com \
    --cc=xuewen.yan94@gmail.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