lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 8 Dec 2020 18:24:19 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Pavankumar Kondeti <pkondeti@...eaurora.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Lukasz Luba <lukasz.luba@....com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Quentin Perret <qperret@...gle.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: Re: [RESEND PATCH V3] PM / EM: Micro optimization in em_cpu_energy

On Sat, Nov 28, 2020 at 3:21 AM Pavankumar Kondeti
<pkondeti@...eaurora.org> wrote:
>
> When the sum of the utilization of CPUs in a power domain is zero,
> return the energy as 0 without doing any computations.
>
> Acked-by: Quentin Perret <qperret@...gle.com>
> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>
> 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
> --

Applied as 5.11 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ