From: Quentin Perret <qperret@google.com>
To: Pavankumar Kondeti <pkondeti@codeaurora.org>
Cc: linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: Re: [PATCH] PM / EM: Micro optimization in em_pd_energy
Date: Mon, 23 Nov 2020 10:28:39 +0000 [thread overview]
Message-ID: <20201123102839.GB447993@google.com> (raw)
In-Reply-To: <1606126679-11799-1-git-send-email-pkondeti@codeaurora.org>
Hi Pavan,
On Monday 23 Nov 2020 at 15:47:57 (+0530), Pavankumar Kondeti wrote:
> When the sum of the utilization of CPUs in a power domain is zero,
s/power/performance
> return the energy as 0 without doing any computations.
>
> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
> ---
> 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
Makes sense to me, so with nit above:
Acked-by: Quentin Perret <qperret@google.com>
Thanks!
Quentin
next prev parent reply other threads:[~2020-11-23 10:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 10:17 Pavankumar Kondeti
2020-11-23 10:28 ` Quentin Perret [this message]
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 ` [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=20201123102839.GB447993@google.com \
--to=qperret@google.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=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®