Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2635514pxb; Mon, 19 Apr 2021 10:05:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmKO95NbDqPMPXvM2Jm1ZDqZebTMkedrBmRkY5Ey4OIyEgtFZU4UwbtvGbVsW7h4dzDf30 X-Received: by 2002:a17:903:4101:b029:ea:fc8a:9adb with SMTP id r1-20020a1709034101b02900eafc8a9adbmr24277368pld.49.1618851918743; Mon, 19 Apr 2021 10:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618851918; cv=none; d=google.com; s=arc-20160816; b=mJmVFzwQ76YDwM3TZDvlPbeLWv6a6CE2gmphMd2hjLYLgtMgQ+BEfey0KolPtKMGMI DAhtYz+t/JywXBOqQdNSQiKbXirb8hl5aJlHQImo7I+Dk5Og+cWrej2Zc7xIpY+/aamK /1Wa0tnlBAVsT7BjRYaYiRPpyfOK+0nccWGUsnYqZ81fABFXI5WDLic/8lhZyIe2Xotz cH3D7WMgt+0o9MXddThhMge9hWvgZrTRdecD6sDFcy6/AibbKJRcDjm/TkN9zPldghs5 Mp/+hE9iGL9wE6Jv4A/mduXRZWk3g3/MP400yUK2vOqUU39JreAPt5xb9rqZinIVCvVA RPjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=J8QjEYBbvB8EZ7HVfkkgROTVLG1BiZlwS06IFaz6vb4=; b=VhO7bMYTqw8Ovy49nJcCGHT8MQ9l7eM6xV+qSMhICXqefe2BL0qx4IXCEEb+VnjY4x NNjKEgBGvwl44jyzAaRna1LKyxwsHTjWu3tKugaQuDh7eyaKULCI1xXcwZBuVrFxO12X 5gXxvTl9o0B7pY4ahO1b4QDEuno0G2C67q20olMe/I4pmEx/eorrMJpEAJdMToBexLDW LtK6xxxMXDJaSh/TArp0I75KVefIRFmrYVnt9UFzOJL/1VByk/hQwa1eNtOl9Xmv98eq t9boZUCWz+dPrYgiCSpfv9KlFF1HNjapBJPq7FqGgThLB1LAbZhRK5Zbw3meFYhbw79z bOhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F5iC93qF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm4si69136pjb.42.2021.04.19.10.05.04; Mon, 19 Apr 2021 10:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F5iC93qF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239479AbhDSREK (ORCPT + 99 others); Mon, 19 Apr 2021 13:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbhDSREH (ORCPT ); Mon, 19 Apr 2021 13:04:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DC94611F0; Mon, 19 Apr 2021 17:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618851817; bh=4TN6AWyr8Mp46QNWs/wmku8VNsRtmirE+GdcjIHkR+4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F5iC93qFlmAZ+sfA95daecqActJGO2ozsNHyY3IJbUSE9VUjPcNhZw6InR0xXApNB z/hWndKm0MErsMRDcflV9k8FT2PnEh+NMJhrqEKfKAQLP4qg1VBFSbhUo0TR/QRd0S h5SXsFHKUuRjupDSP07DaAPsKEpHXOP5ldXHvraa4szt99jQ50m62NXw7xJxGr/4En WgzNgAcP2zdzj7Sb+JIWtJM6jnJ2gxkyabJ3xJ2gJ+Xum7RCk9O8d2DrWeVQa1op+J M7BXBL0vpVX13HcbczijCva5/aRG748Xorw+gdOQIgWUdbSXvIfA5iYjpr9eQwAJzE peoNKfRhDiEvg== Date: Mon, 19 Apr 2021 18:03:32 +0100 From: Will Deacon To: Sumit Garg Cc: Alexandru Elisei , Catalin Marinas , Daniel Thompson , Douglas Anderson , Lecopzer Chen , Lecopzer Chen , linux-arm-kernel , Linux Kernel Mailing List , Mark Rutland , Stephen Boyd , yj.chiang@mediatek.com Subject: Re: [PATCH v5] arm64: Enable perf events based hard lockup detector Message-ID: <20210419170331.GB31045@willie-the-truck> References: <20210330080615.21938-1-lecopzer.chen@mediatek.com> <20210330083218.22285-1-lecopzer.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 05:31:13PM +0530, Sumit Garg wrote: > On Tue, 30 Mar 2021 at 18:00, Sumit Garg wrote: > > On Tue, 30 Mar 2021 at 14:07, Lecopzer Chen wrote: > > > > > On Fri, 15 Jan 2021 at 17:32, Sumit Garg wrote: > > > > > > > > > > > > With the recent feature added to enable perf events to use pseudo NMIs > > > > > > as interrupts on platforms which support GICv3 or later, its now been > > > > > > possible to enable hard lockup detector (or NMI watchdog) on arm64 > > > > > > platforms. So enable corresponding support. > > > > > > > > > > > > One thing to note here is that normally lockup detector is initialized > > > > > > just after the early initcalls but PMU on arm64 comes up much later as > > > > > > device_initcall(). So we need to re-initialize lockup detection once > > > > > > PMU has been initialized. > > > > > > > > > > > > Signed-off-by: Sumit Garg > > > > > > --- > > > > > > > > > > > > Changes in v5: > > > > > > - Fix lockup_detector_init() invocation to be rather invoked from CPU > > > > > > binded context as it makes heavy use of per-cpu variables and shouldn't > > > > > > be invoked from preemptible context. > > > > > > > > > > > > > > > > Do you have any further comments on this? > > > > > > > Since there aren't any further comments, can you re-pick this feature for 5.13? I'd still like Mark's Ack on this, as the approach you have taken doesn't really sit with what he was suggesting. I also don't understand how all the CPUs get initialised with your patch, since the PMU driver will be initialised after SMP is up and running. Will