From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98EC031E822 for ; Fri, 5 Jun 2026 21:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780693925; cv=none; b=VMKEks8N/qXBZcYcCATXOcmr4SdXQL5OfI4RlTsjyEek/3GT8PsU7bjQ6MpmSTkofvYwYKWaw/6N4ygmjkwD5TpI7xHZmy/zD8gOqrcIH0AC937wjBa9PJSHJ3K4ruuGYYC/VV9mJdUvPP/0WNL+3mZs98RB4Ndq3edLKcTklg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780693925; c=relaxed/simple; bh=heyQg+Ow89eNMh5x0cfozEqtnayjWL7KPb79dXHHz7Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VvBlQPm++rEdCS5eknSaAvh4lLislbNuqIRAFuOeMjw+tMcIPiFYqZZ/WB7cD10eChS6fGiyT3y9H+SSPJwqn/HXKsrxmp6FLxQxhdTIh2oUOV5Ak13yopDtsF5VqVxlvxZdsm0d30+WA86/E7d0hYhRK6GOkRQaBdAgRzgRQsU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=VX88Al8o; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=H00p6Q+n; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="VX88Al8o"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="H00p6Q+n" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id A7DAEEC0206; Fri, 5 Jun 2026 17:12:02 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Fri, 05 Jun 2026 17:12:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1780693922; x=1780780322; bh=czHxBAolVx1VraDScwu9+FjCluhxvvdJ OEu/z08ODOE=; b=VX88Al8obcXfoxjRgExahYgKrjn6grnWRYAtkqsTPjILQATZ J3t20mfP+NfKYuC0Dllw9PNsU54XX6DGRv9Bu+kOLn7rkGn2PvkIvRly6thsDQEn r2yTEvI2v2bSBXAqUmvHsCeYHMqK0RGBaiuDB0DTH3E0ta+OhbitYYh1wz5q8xew ZVIXJy033PEFMrFbHqVFwrKqzdb+bhtHXeAxpqvDLICR7AJW5I8yJ0CV8GtDjQBM r8lO/QURITe9ZO2k4nk9UrfV74q+SJ9HvwFKfnYFSrCDZRt12zy1zgNQr3pFG2IH nXff37xobHDhCqtzVD2YLT7MOh0AgxfBL53j0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1780693922; x=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8+4EwFrWBlnfKKXUx7VV3N/udJDMwFwAbQ X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 Jun 2026 17:12:00 -0400 (EDT) Date: Fri, 5 Jun 2026 22:11:57 +0100 From: Kiryl Shutsemau To: Doug Anderson Cc: Catalin Marinas , Will Deacon , James Morse , Mark Rutland , Marc Zyngier , Petr Mladek , Thomas Gleixner , Andrew Morton , Baoquan He , Puranjay Mohan , Usama Arif , Breno Leitao , Julien Thierry , Lecopzer Chen , Sumit Garg , kernel-team@meta.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] arm64: wire SDEI NMI into the hardlockup watchdog Message-ID: References: <6172eafcb9de6e626c0f1c36426d67e1e562ed32.1780496779.git.kas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Jun 05, 2026 at 01:03:05PM -0700, Doug Anderson wrote: > Hi, > > On Wed, Jun 3, 2026 at 7:36 AM Kiryl Shutsemau wrote: > > > > From: "Kiryl Shutsemau (Meta)" > > > > Select HAVE_HARDLOCKUP_DETECTOR_ARCH so the framework takes its backend > > from this driver. A per-CPU hrtimer checks its buddy's heartbeat and > > signals event 0 at a stalled CPU, which runs watchdog_hardlockup_check() > > NMI-like. > > > > The source is chosen at boot: SDEI if firmware provides it, otherwise a > > perf-NMI counter (pseudo-NMI) fallback -- one image covers both. > > > > Signed-off-by: Kiryl Shutsemau (Meta) > > --- > > arch/arm64/Kconfig | 1 + > > drivers/firmware/Kconfig | 3 + > > drivers/firmware/sdei_nmi.c | 247 +++++++++++++++++++++++++++++++++++- > > 3 files changed, 248 insertions(+), 3 deletions(-) > > I'm a little confused about this patch. We already have a buddy > hardlockup detector using the hrtimer, and it's even been improved > recently to trigger in a smaller time bound. It looks as if you're > duplicating bits of the perf and buddy detector here? > > I don't think you need this patch at all. The existing buddy detector > + patches #1 and #2 in your series should be sufficient. You're mostly right. Buddy + #2 covers the console case (the remote branch triggers the culprit's backtrace, which #2 makes deliverable), and #4 gets the wedged CPU's registers into the vmcore. The one thing this patch adds that a config can't is boot-time source selection: PERF-compiled kernels have no detector on a pseudo_nmi=0 boot, and PREFER_BUDDY costs the pseudo-NMI machines perf self-detection. But that's arguably out of scope for the patchset. I'll drop this patch in v2 and run PREFER_BUDDY here. If a runtime perf->buddy fallback ever materializes, the gap closes entirely. -- Kiryl Shutsemau / Kirill A. Shutemov