Linux Perf Users
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Yunhui Cui <cuiyunhui@bytedance.com>
Cc: akpm@linux-foundation.org, catalin.marinas@arm.com,
	maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
	christophe.leroy@csgroup.eu, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	hpa@zytor.com, peterz@infradead.org, acme@kernel.org,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, kees@kernel.org, masahiroy@kernel.org,
	aliceryhl@google.com, ojeda@kernel.org,
	thomas.weissschuh@linutronix.de, xur@google.com,
	ruanjinjie@huawei.com, gshan@redhat.com, maz@kernel.org,
	suzuki.poulose@arm.com, zhanjie9@hisilicon.com,
	yangyicong@hisilicon.com, dianders@chromium.org,
	gautam@linux.ibm.com, arnd@arndb.de, zhao.xichao@vivo.com,
	rppt@kernel.org, lihuafei1@huawei.com, coxu@redhat.com,
	jpoimboe@kernel.org, yaozhenguo1@gmail.com,
	luogengkun@huaweicloud.com, max.kellermann@ionos.com,
	tj@kernel.org, wangjinchao600@gmail.com, yury.norov@gmail.com,
	thorsten.blum@linux.dev, x86@kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] watchdog: remove HARDLOCKUP_DETECTOR_PERF
Date: Mon, 15 Sep 2025 11:26:09 +0100	[thread overview]
Message-ID: <aMfpwYPX6_i6ROOY@willie-the-truck> (raw)
In-Reply-To: <20250915035355.10846-1-cuiyunhui@bytedance.com>

On Mon, Sep 15, 2025 at 11:53:55AM +0800, Yunhui Cui wrote:
> There are currently two hard lockup detector implementations:
> HARDLOCKUP_DETECTOR_PERF (perf-based) and HARDLOCKUP_DETECTOR_BUDDY
> (buddy-based). When enabling the hardlockup feature on new arch
> (e.g., RISC-V), ambiguity arises regarding which detector to choose.
> 
> From the community discussion (see link below [1]), the buddy approach is
> preferred. So remove the HARDLOCKUP_DETECTOR_PERF implementation.
> 
> Link: https://lore.kernel.org/all/CAD=FV=WWUiCi6bZCs_gseFpDDWNkuJMoL6XCftEo6W7q6jRCkg@mail.gmail.com/ [1]

This is a link to a thread containing two messages, so I think it's a
little premature to say whether one driver is preferred over the other.

> Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com>
> ---
>  arch/Kconfig                     |  14 --
>  arch/arm64/Kconfig               |   3 -
>  arch/arm64/kernel/Makefile       |   1 -
>  arch/arm64/kernel/watchdog_hld.c |  94 ----------

The main reason we used HARDLOCKUP_DETECTOR_PERF on arm64 is because we
can use interrupt priorities to treat the PMU overflow interrupt like
an NMI, meaning that even if CPUs get wedged with irqs disabled then
we're still able to trigger the watchdog reset.

How does HARDLOCKUP_DETECTOR_BUDDY achieve that? From my cursory glance
at the code, it just looks to be using an hrtimer.

/me looks back at the "discussion" cited in the commit message:

  | If all CPUs are hard locked up at the same time the buddy system
  | can't detect it.

Ok, so why is that limitation acceptable? It looks to me like you're
removing useful functionality.

Will

  reply	other threads:[~2025-09-15 10:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  3:53 [PATCH] watchdog: remove HARDLOCKUP_DETECTOR_PERF Yunhui Cui
2025-09-15 10:26 ` Will Deacon [this message]
2025-09-15 10:35   ` Peter Zijlstra
2025-09-15 15:42     ` Doug Anderson
2025-09-16  1:46       ` Jinchao Wang
2025-09-16  2:50         ` Ian Rogers
2025-09-16  7:42       ` Peter Zijlstra
2025-09-16 15:50         ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aMfpwYPX6_i6ROOY@willie-the-truck \
    --to=will@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=coxu@redhat.com \
    --cc=cuiyunhui@bytedance.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=gautam@linux.ibm.com \
    --cc=gshan@redhat.com \
    --cc=hpa@zytor.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kees@kernel.org \
    --cc=lihuafei1@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luogengkun@huaweicloud.com \
    --cc=maddy@linux.ibm.com \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=max.kellermann@ionos.com \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=thorsten.blum@linux.dev \
    --cc=tj@kernel.org \
    --cc=wangjinchao600@gmail.com \
    --cc=x86@kernel.org \
    --cc=xur@google.com \
    --cc=yangyicong@hisilicon.com \
    --cc=yaozhenguo1@gmail.com \
    --cc=yury.norov@gmail.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhao.xichao@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox