Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5574169rwr; Mon, 24 Apr 2023 06:17:42 -0700 (PDT) X-Google-Smtp-Source: AKy350b2IvKS1AwTA1qNlhZ7BxhQl8r9Sl8SLzq/qaLp7uWGJ82rKvI7bSkty1wbGzbbCmnDvK2h X-Received: by 2002:a05:6a00:1887:b0:624:7c9a:c832 with SMTP id x7-20020a056a00188700b006247c9ac832mr17735717pfh.8.1682342262432; Mon, 24 Apr 2023 06:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682342262; cv=none; d=google.com; s=arc-20160816; b=ECOTJpeVr6Bb45FY9bZpHI43kYzzLvuX/y0hC6N+7UBikVllEw+Uu2Juy0v8lNRA3X PC7mSNsJF48VktYQ+41sbdYwJSuTumMFJ1itpo50DsPtHRACAVLask60Z9BhOElxtnKx GuFcforarxNDGipug7hAuOPEWJU/YljeecRuaU7izOgTdqxeKwXcxLLqX1QMCmRAtnYg qXuzOMZ2fyD40xApMKH6VyqM+wfxXdj6G4MttIjYcDGU5i9Y4O5oXtr9RDLxhrY7BEyY HjiodRnrlsh4+dj92aXpd0hu392eRmMB1iL+tL5GgUfWPIp7uPOwB47CSls/MewDgxZW PQ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y93RjN7osl+y397UDjyIqrYTNL58RSMeMDAuuxAAix4=; b=bQHTD4Qkunh4tybUEa/sG2BO9uFbw+IwRCNVpjr2TRAkc5G5AUWbOofNqlixtYhUUn kOWE2ZR+rElg9KJ5nVgI1nODex718T9H1rvdIGDQmOFJkLGHG7iiMQJtLpIQhzHgAbIw j7wLLHwCdidSNmoNr4YVBBAbDwIA3wfIBtRndF2eUNIyQV2K0yHh9Wh68aoq4JO3XhLV rjPHT4hL2klyJTBhf865AQFxlb3Yw/58EVYSqN2xyHEu1iGItykIlHaED5njcfzgt4SR FJSMIO93k4JNdQcDUZdDyDdAvFUtyvVyiOrw1Vf57R1xhFN9p8pbnSUPUQL5aF50QshF 9JPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fx/YbkRL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b0050cfba70e65si10777664pgp.318.2023.04.24.06.17.29; Mon, 24 Apr 2023 06:17:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fx/YbkRL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbjDXMyF (ORCPT + 99 others); Mon, 24 Apr 2023 08:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbjDXMyD (ORCPT ); Mon, 24 Apr 2023 08:54:03 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00DE940D5 for ; Mon, 24 Apr 2023 05:53:58 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id ffacd0b85a97d-2fa47de5b04so4250556f8f.1 for ; Mon, 24 Apr 2023 05:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682340837; x=1684932837; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=y93RjN7osl+y397UDjyIqrYTNL58RSMeMDAuuxAAix4=; b=fx/YbkRLMKg6m8Sa/za26aYtpnzU44YMASX9fjcUXDJGn8yR7Ruei6kmPPnj/ae8FY HTHCbo3Isb3+XAu5RDllgPIvu+vM5eBl5KwVAu/AaHbS6MhzPEDUJZbg57ayDeCKYuTC UHgqvXe9X8597K9pW5JsXW57AuSoxWHROFMGSRXoF4Oq0pTHOG+UAwWSJsY0kMPJPAhg 1JiDorHB2655MBErHTYyR8twSll1r4wll3jKGWTnjqvio3OIamM/gzFSw6dhhPQZxSvA lrEQA0mdYBoRg/iDaPUg11FtaHkubjJsf9tnC1gsP+JyK/1IisATdHSc0f/PEvHsMoHO fy0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682340837; x=1684932837; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=y93RjN7osl+y397UDjyIqrYTNL58RSMeMDAuuxAAix4=; b=VG6K8a9g1yv/b8HRrgmNfxyvIqeV8+SP/RsuUXkz1/KIIyIGHNuoWH05JbUqFbMASW lYGa2yCii/dBUQkoIK/eAfw4BdNj0VXxyu7WwiTLOWBBLIVSfmMEVfjZsEY4yLTxxUb7 TWTara1q5CQJ6V6pT0VgYCXCTOuU9BKY/xNtDBUzKeqGkcQeMkuVzzQaAZmAbYmU4Bvu Tr69S6VRCsyZ6aZRPwJCyVr5JGa/KczX3B1+B2nDlTwcSPMCFtdNfFeikVB8zYguw4pQ pQuTsg0Si6PnkJNUN6nm/lyEEkaW4OIE/H788n3Cn6zrg+n+P0BBDuTZHWfvNSI0qOmq 1V6g== X-Gm-Message-State: AAQBX9e4HS0LNPuvKbZ9H/eF5Vac7NBoNhsY0FKElgm4DSwsPr1JscZt 9jOEMvmxz/5b5/pcKbRkXuh7TQ== X-Received: by 2002:adf:ec86:0:b0:2f6:fb98:fa62 with SMTP id z6-20020adfec86000000b002f6fb98fa62mr9644645wrn.40.1682340837364; Mon, 24 Apr 2023 05:53:57 -0700 (PDT) Received: from aspen.lan ([31.221.30.162]) by smtp.gmail.com with ESMTPSA id h3-20020a5d5043000000b002c70ce264bfsm10695285wrt.76.2023.04.24.05.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 05:53:56 -0700 (PDT) Date: Mon, 24 Apr 2023 13:53:55 +0100 From: Daniel Thompson To: Douglas Anderson Cc: Petr Mladek , Andrew Morton , Lecopzer Chen , Stephen Boyd , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, kgdb-bugreport@lists.sourceforge.net, Marc Zyngier , linux-perf-users@vger.kernel.org, Mark Rutland , Masayoshi Mizuma , Will Deacon , ito-yuichi@fujitsu.com, Sumit Garg , Catalin Marinas , Colin Cross , Matthias Kaehlcke , Guenter Roeck , Tzung-Bi Shih , Alexander Potapenko , AngeloGioacchino Del Regno , Dan Williams , Geert Uytterhoeven , Ingo Molnar , John Ogness , Josh Poimboeuf , Juergen Gross , Kees Cook , Laurent Dufour , Liam Howlett , Marco Elver , Matthias Brugger , Michael Ellerman , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , "Paul E. McKenney" , Peter Zijlstra , Randy Dunlap , Rasmus Villemoes , Sami Tolvanen , Stefano Stabellini , Vlastimil Babka , Zhaoyang Huang , Zhen Lei , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] hardlockup: detect hard lockups using secondary (buddy) cpus Message-ID: <20230424125355.GA4054@aspen.lan> References: <20230421155255.1.I6bf789d21d0c3d75d382e7e51a804a7a51315f2c@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230421155255.1.I6bf789d21d0c3d75d382e7e51a804a7a51315f2c@changeid> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2023 at 03:53:30PM -0700, Douglas Anderson wrote: > From: Colin Cross > > Implement a hardlockup detector that can be enabled on SMP systems > that don't have an arch provided one or one implemented atop perf by > using interrupts on other cpus. Each cpu will use its softlockup > hrtimer to check that the next cpu is processing hrtimer interrupts by > verifying that a counter is increasing. > > NOTE: unlike the other hard lockup detectors, the buddy one can't > easily provide a backtrace on the CPU that locked up. It relies on > some other mechanism in the system to get information about the locked > up CPUs. This could be support for NMI backtraces like [1], it could > be a mechanism for printing the PC of locked CPUs like [2], or it > could be something else. > > This style of hardlockup detector originated in some downstream > Android trees and has been rebased on / carried in ChromeOS trees for > quite a long time for use on arm and arm64 boards. Historically on > these boards we've leveraged mechanism [2] to get information about > hung CPUs, but we could move to [1]. On the Arm platforms is this code able to leverage the existing infrastructure to extract status from stuck CPUs: https://docs.kernel.org/trace/coresight/coresight-cpu-debug.html Daniel.