mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Pavankumar Kondeti <pkondeti@codeaurora.org>,
	linux-kernel@vger.kernel.org
Cc: Lukasz Luba <lukasz.luba@arm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Quentin Perret <qperret@google.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: Re: [PATCH V3] PM / EM: Micro optimization in em_cpu_energy
Date: Tue, 24 Nov 2020 15:59:40 +0100	[thread overview]
Message-ID: <f98e3547-6896-5bd7-e748-57d1bba377c3@arm.com> (raw)
In-Reply-To: <1606127734-14507-1-git-send-email-pkondeti@codeaurora.org>

On 23/11/2020 11:35, Pavankumar Kondeti wrote:
> When the sum of the utilization of CPUs in a performance domain is
> zero, return the energy as 0 without doing any computations.
> 
> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
> ---
> V3: %s/power/performance as corrected by Quentin
> V2: Fixed the function name in the commit message.
> 
>  include/linux/energy_model.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
> index b67a51c..8810f1f 100644
> --- a/include/linux/energy_model.h
> +++ b/include/linux/energy_model.h
> @@ -103,6 +103,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
>  	struct em_perf_state *ps;
>  	int i, cpu;
>  
> +	if (!sum_util)
> +		return 0;
> +
>  	/*
>  	 * In order to predict the performance state, map the utilization of
>  	 * the most utilized CPU of the performance domain to a requested


LGTM.

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

  reply	other threads:[~2020-11-24 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 10:17 [PATCH] PM / EM: Micro optimization in em_pd_energy Pavankumar Kondeti
2020-11-23 10:28 ` Quentin Perret
2020-11-23 10:44   ` Pavan Kondeti
2020-11-23 10:29 ` [PATCH V2] PM / EM: Micro optimization in em_cpu_energy Pavankumar Kondeti
2020-11-23 10:35   ` [PATCH V3] " Pavankumar Kondeti
2020-11-24 14:59     ` Dietmar Eggemann [this message]
2020-11-24 17:15   ` [PATCH V2] " Rafael J. Wysocki
2020-11-28  1:39     ` [RESEND PATCH V3] " Pavankumar Kondeti
2020-12-08 17:24       ` 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=f98e3547-6896-5bd7-e748-57d1bba377c3@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=gustavo@embeddedor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=pkondeti@codeaurora.org \
    --cc=qperret@google.com \
    --cc=rafael.j.wysocki@intel.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®