mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
To: Pavankumar Kondeti <pkondeti@codeaurora.org>,
	linux-kernel@vger.kernel.org
Cc: Lukasz Luba <lukasz.luba@arm.com>,
	Quentin Perret <qperret@google.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: Re: [PATCH V2] PM / EM: Micro optimization in em_cpu_energy
Date: Tue, 24 Nov 2020 18:15:33 +0100	[thread overview]
Message-ID: <671427cc-2abb-68eb-5e54-0851785efa84@intel.com> (raw)
In-Reply-To: <1606127371-13828-1-git-send-email-pkondeti@codeaurora.org>

On 11/23/2020 11:29 AM, Pavankumar Kondeti wrote:
> When the sum of the utilization of CPUs in a power domain is zero,
> return the energy as 0 without doing any computations.
>
> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
> ---
> 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

If I'm to take this, please resend it with a CC to 
linux-pm@vger.kernel.org (and with the tags you've received so far).

Thanks!



  parent reply	other threads:[~2020-11-24 17:16 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
2020-11-24 17:15   ` Rafael J. Wysocki [this message]
2020-11-28  1:39     ` [RESEND PATCH " 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=671427cc-2abb-68eb-5e54-0851785efa84@intel.com \
    --to=rafael.j.wysocki@intel.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 \
    /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®