[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201123102839.GB447993@google.com>
Date: Mon, 23 Nov 2020 10:28:39 +0000
From: Quentin Perret <qperret@...gle.com>
To: Pavankumar Kondeti <pkondeti@...eaurora.org>
Cc: linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Lukasz Luba <lukasz.luba@....com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: Re: [PATCH] PM / EM: Micro optimization in em_pd_energy
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@...eaurora.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@...gle.com>
Thanks!
Quentin
Powered by blists - more mailing lists