Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2808628rwb; Mon, 7 Aug 2023 04:02:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWRwI546bgR7RCqYhi9PitZewGgS30fjEXwYmdNB6OF5t+8CfC7cWALxDEH3N3MYnyALQj X-Received: by 2002:a2e:9c8a:0:b0:2b6:b6c4:6e79 with SMTP id x10-20020a2e9c8a000000b002b6b6c46e79mr6314448lji.1.1691406172613; Mon, 07 Aug 2023 04:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691406172; cv=none; d=google.com; s=arc-20160816; b=Md7d17H4rJ7qhOspXK0BQrEcAKzWBNIwiEAeQ56wosTkRcS9gH+iqGw0oojIhi1Szw 9rXTXD+r5w4V7xykS4o9Jq6C3Yj02Rtuvbem0aX/TODa4zWop9aqukkvKnobGvVxvKpy 3XHNzymh19QQCKIgdfNJgeJX1PZfkRyQDhRk3rMScPQr6T/V2wWRkJaeYXGS24G6dPHf L27g1Y8NmOru4TQ4FAVmO1roaj/2nfba/5eWs34F6t0+YIRUO4Ed7SLOCfuf0z5GHfBe KcbzhmvaaKkYBH5kTMWM8EKvN0LWHj/UiZgDpwBsrmrSNKe1pC5xan8vaUYC5Z/oP165 M0uQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FMOb8IYtCmS+E4jNk4oBwORy3lnCiGIs7wIOH4/W3Kw=; fh=hM+m1MRuX3ILusbb1NKNTyBldVSM72HwvnAmqHrHRnU=; b=R7PUM3Kh3v96uWwRGpulLzMnKQtky6d9ywwXfluxUz+6/Th6PxsyIae7Y2SDjiNrbq C2EN5kCSQr/y5drVo9W+WsiNc3QUJqlOiG2xj7twefFwzRStLueggQ/g+oVkVkuoR5gv goT1YdyP2raHueHIqdaBcRGaAOyJTvM9ZenUBXu99T7gxirrNF/1/sGXObl21ja9raoY WENJr1SPlii0X5mx4CVKxBKw1NhcyFhfdSpgPI6evhxMqqO2jBDvvKZYE6NLErr2PE4h VtkM6GM81ZDJfmQ3rOqY5Xpk0MQb8gPGuxm6WBF1rQ9mPYUT9SHqtqLcByhl8p+TKit1 AIMA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ka12-20020a170907990c00b0099ba1cf9543si5390005ejc.460.2023.08.07.04.01.51; Mon, 07 Aug 2023 04:02:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjHGKlf (ORCPT + 99 others); Mon, 7 Aug 2023 06:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbjHGKld (ORCPT ); Mon, 7 Aug 2023 06:41:33 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CAC61701; Mon, 7 Aug 2023 03:41:32 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 65E681FB; Mon, 7 Aug 2023 03:42:14 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.32.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 875743F59C; Mon, 7 Aug 2023 03:41:27 -0700 (PDT) Date: Mon, 7 Aug 2023 11:41:24 +0100 From: Mark Rutland To: Doug Anderson Cc: Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier , linux-perf-users@vger.kernel.org, ito-yuichi@fujitsu.com, Chen-Yu Tsai , Ard Biesheuvel , Stephen Boyd , Peter Zijlstra , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kgdb-bugreport@lists.sourceforge.net, Masayoshi Mizuma , "Rafael J . Wysocki" , Lecopzer Chen , Andrey Konovalov , Ben Dooks , Frederic Weisbecker , "Gautham R. Shenoy" , Ingo Molnar , Jason Wessel , Josh Poimboeuf , Masahiro Yamada , Valentin Schneider , Wei Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 0/7] arm64: Add debug IPI for backtraces / kgdb; try to use NMI for it Message-ID: References: <20230601213440.2488667-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 Hi Doug, Apologies for the delay. On Mon, Jul 24, 2023 at 08:55:44AM -0700, Doug Anderson wrote: > On Thu, Jun 1, 2023 at 2:37 PM Douglas Anderson wrote: > I'm looking for some ideas on what to do to move this patch series > forward. Thanks to Daniel, the kgdb patch is now in Linus's tree which > hopefully makes this simpler to land. I guess there is still the > irqchip dependency that will need to be sorted out, though... > > Even if folks aren't in agreement about whether this is ready to be > enabled in production, I don't think anything here is super > objectionable or controversial, is it? Can we land it? If you feel > like it needs extra review, would it help if I tried to drum up some > extra people to provide review feedback? Ignoring the soundness issues I mentioned before (which I'm slowly chipping away at, and you're likely lucky enough to avoid in practice)... Having looked over the series, I think the GICv3 bit isn't quite right, but is easy enough to fix. I've commented on the patch with what I think we should have there. The only major thing otherwise from my PoV is the structure of the debug IPI framework. I'm not keen on that being a separate body of code and I think it should live in smp.c along with the other IPIs. I'd also strongly prefer if we could have separate IPI_CPU_BACKTRACE and IPI_CPU_KGDB IPIs, and I think we can do that either by unifying IPI_CPU_STOP && IPI_CPU_CRASH_STOP or by reclaiming IPI_WAKEUP by reusing a different IPI for the parking protocol (e.g. IPI_RESCHEDULE). I think it'd be nice if the series could enable NMIs for backtrace and the CPU_{,CRASH_}STOP cases, with KGDB being the bonus atop. That way it'd be clearly beneficial for anyone trying to debug lockups even if they're not a KGDB user. > Also: in case it's interesting to anyone, I've been doing benchmarks > on sc7180-trogdor devices in preparation for enabling this. On that > platform, I did manage to see about 4% reduction in a set of hackbench > numbers when fully enabling pseudo-NMI. However, when I instead ran > Speedometer 2.1 I saw no difference. See: > > https://issuetracker.google.com/issues/197061987 Thanks for the pointer! I know that there are a couple of things that we could do to slightly improve local_irq_*() when using pNMIs, though I suspect that the bulk of the cost there will come from the necessary synchronization. Thanks, Mark.