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: <5DB7DD91-7213-4A30-B89E-FB28AD96F8C5@fb.com>
Date:   Wed, 17 May 2023 04:38:52 +0000
From:   Song Liu <songliubraving@...a.com>
To:     "Li, Xin3" <xin3.li@...el.com>
CC:     Song Liu <song@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <kernel-team@...a.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2] watchdog: Prefer use "ref-cycles" for NMI watchdog



> On May 16, 2023, at 6:23 PM, Li, Xin3 <xin3.li@...el.com> wrote:
> 
>> NMI watchdog permanently consumes one hardware counters per CPU on the
>> system. For systems that use many hardware counters, this causes more
>> aggressive time multiplexing of perf events.
>> 
>> OTOH, some CPUs (mostly Intel) support "ref-cycles" event, which is rarely
>> used. Try use "ref-cycles" for the watchdog, so that one more hardware
>> counter is available to the user. If the CPU doesn't support "ref-cycles",
>> fall back to "cycles".
>> 
>> The downside of this change is that users of "ref-cycles" need to disable
>> nmi_watchdog.
> 
> From the discussion in v1, the users don't have to disable the NMI watchdog
> *permanently*, right?

The users need to disable NMI watchdog when using ref-cycles. For example:

    # disable nmi_watchdog
    sysctl kernel.nmi_watchdog=0

    # use ref-cycles
    perf stat/record -e ref-cycles ...

    # reenable nmi_watchdog
    sysctl kernel.nmi_watchdog=1

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ