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: <CAJZ5v0iNhn-TYiAWrY_m5+uOCOf-g3F-rzf1RjbEzmOcU4gVsQ@mail.gmail.com>
Date:   Tue, 19 Apr 2022 17:34:56 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [patch 01/10] x86/aperfmperf: Dont wake idle CPUs in arch_freq_get_on_cpu()

On Fri, Apr 15, 2022 at 9:19 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> aperfmperf_get_khz() already excludes idle CPUs from APERF/MPERF sampling
> and that's a reasonable decision. There is no point in sending up to two
> IPIs to an idle CPU just because someone reads a sysfs file.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

> ---
>  arch/x86/kernel/cpu/aperfmperf.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> --- a/arch/x86/kernel/cpu/aperfmperf.c
> +++ b/arch/x86/kernel/cpu/aperfmperf.c
> @@ -139,6 +139,9 @@ unsigned int arch_freq_get_on_cpu(int cp
>         if (!housekeeping_cpu(cpu, HK_TYPE_MISC))
>                 return 0;
>
> +       if (rcu_is_idle_cpu(cpu))
> +               return 0;
> +
>         if (aperfmperf_snapshot_cpu(cpu, ktime_get(), true))
>                 return per_cpu(samples.khz, cpu);
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ