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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0j+LS_0jaZwvze_8ar2n1R1FYqx0w_nM89SySg7oExi6A@mail.gmail.com>
Date:   Fri, 4 Feb 2022 19:29:00 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Yury Norov <yury.norov@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        David Laight <David.Laight@...lab.com>,
        Joe Perches <joe@...ches.com>, Dennis Zhou <dennis@...nel.org>,
        Emil Renner Berthing <kernel@...il.dk>,
        Nicholas Piggin <npiggin@...il.com>,
        Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        Alexey Klimov <aklimov@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 03/54] thermal/intel: don't use bitmap_weight() in end_power_clamp()

On Sun, Jan 23, 2022 at 7:39 PM Yury Norov <yury.norov@...il.com> wrote:
>
> Don't call bitmap_weight() if the following code can get by
> without it.
>
> Signed-off-by: Yury Norov <yury.norov@...il.com>
> ---
>  drivers/thermal/intel/intel_powerclamp.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
> index 14256421d98c..c841ab37e7c6 100644
> --- a/drivers/thermal/intel/intel_powerclamp.c
> +++ b/drivers/thermal/intel/intel_powerclamp.c
> @@ -556,12 +556,9 @@ static void end_power_clamp(void)
>          * stop faster.
>          */
>         clamping = false;
> -       if (bitmap_weight(cpu_clamping_mask, num_possible_cpus())) {
> -               for_each_set_bit(i, cpu_clamping_mask, num_possible_cpus()) {
> -                       pr_debug("clamping worker for cpu %d alive, destroy\n",
> -                                i);
> -                       stop_power_clamp_worker(i);
> -               }
> +       for_each_set_bit(i, cpu_clamping_mask, num_possible_cpus()) {
> +               pr_debug("clamping worker for cpu %d alive, destroy\n", i);
> +               stop_power_clamp_worker(i);
>         }
>  }
>
> --

Applied as 5.18 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ