Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2859988rwb; Mon, 7 Aug 2023 04:55:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIs+Ldwv8j3vPCAR53PCzvH/BxyFtE/gKzYkOhciugEfW+k8cSP6WdkZzb81IG7rPkPU72 X-Received: by 2002:a05:6512:b8d:b0:4fe:cc2:247a with SMTP id b13-20020a0565120b8d00b004fe0cc2247amr6648510lfv.49.1691409318504; Mon, 07 Aug 2023 04:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691409318; cv=none; d=google.com; s=arc-20160816; b=RlYwgISGbCKyWYDV+cTRNTnG6oWO8pGYisdm/4KZiJQSD6bRcd1AXL1HzcAcyzn25e Q4XkBR860ARlZeM6OGXZXaQolaxfZ33wmfShyFPQVF5dfzr6rbRr1H3BYVlU8oNQwM7k XVLU7GUAIR/kT8wS73tpMhL3fFOoCwTbF6FKj7+e2dikDRslNpa/QQc2I+ChWNp9vLIP FpkxS9XcN4jv3fwyqmp1DhoQi5N0bn4KMehfOuG44g3bz3R3eBWXL0gwnKTyR0MD3R01 3IrI68gS8HTTXuQTX9Y/qDVVp9G+ZQbwMjPhlCW2bjO6/8y4X+lP2hL7LJRxgcPNOvyB iaXg== 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; bh=a3DFZ/rTIIbU3pYFVDvTAsg8gg+cYcnOE4WG1D3Tjq8=; fh=bugMrCk9FQsRLMZhYxVzDhCR9wM8Q6fvixBdmO0gpDs=; b=RPzth3mQSeJvVC2vCD5bZPJq/Ll2cvCPkgqx1w2r2Z2xC0sPYyBMxMvGm4Feyx2o5U aUVxWdekTfBk7kbKCr0CE0yr0cgLi2Y/n3wnM+9D8guv3a/0LboMwNS9oZbYnWvUPs2v pHj7uRlxKni8/UC4EMYtaxGRG1Z4nmggifb5DCSU4VITlQc7ljxbr0T3ekzFQ96qfc+y DJmwSDKCRkXT7JKq323Q07DeSdFIEyz4TSl0VYapaz8ygPYSZgCAi4hnUF5vUmWSGXL7 8hJsXXAM95MI66aDhmTeOEvq6RbfUV+UukxlypUEHRxW8ayOLa2wJBTMOY5NVOzCbj4Z xXTw== 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 b14-20020aa7dc0e000000b005231e0afe80si5386824edu.567.2023.08.07.04.54.53; Mon, 07 Aug 2023 04:55:18 -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 S232596AbjHGLYC (ORCPT + 99 others); Mon, 7 Aug 2023 07:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbjHGLXm (ORCPT ); Mon, 7 Aug 2023 07:23:42 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12426423F; Mon, 7 Aug 2023 04:21:31 -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 DD8911FB; Mon, 7 Aug 2023 04:14:44 -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 268F03F59C; Mon, 7 Aug 2023 04:13:59 -0700 (PDT) Date: Mon, 7 Aug 2023 12:13:56 +0100 From: Mark Rutland To: Marc Zyngier Cc: Douglas Anderson , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , 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 , Wei Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 7/7] arm64: kgdb: Roundup cpus using the debug IPI Message-ID: References: <20230601213440.2488667-1-dianders@chromium.org> <20230601143109.v9.7.I2ef26d1b3bfbed2d10a281942b0da7d9854de05e@changeid> <7a295fcb4ff02542ff6835a77182fce8@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a295fcb4ff02542ff6835a77182fce8@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 On Mon, Aug 07, 2023 at 12:08:06PM +0100, Marc Zyngier wrote: > On 2023-08-07 11:54, Mark Rutland wrote: > > On Mon, Aug 07, 2023 at 11:47:04AM +0100, Marc Zyngier wrote: > > > On 2023-08-07 11:28, Mark Rutland wrote: > > > > On Thu, Jun 01, 2023 at 02:31:51PM -0700, Douglas Anderson wrote: > > > > > From: Sumit Garg > > > > > > > > > > Let's use the debug IPI for rounding up CPUs in kgdb. When the debug > > > > > IPI is backed by an NMI (or pseudo NMI) then this will let us debug > > > > > even hard locked CPUs. When the debug IPI isn't backed by an NMI then > > > > > this won't really have any huge benefit but it will still work. > > > > > > > > > > Signed-off-by: Sumit Garg > > > > > Signed-off-by: Douglas Anderson > > > > > --- > > > > > > > > > > Changes in v9: > > > > > - Remove fallback for when debug IPI isn't available. > > > > > - Renamed "NMI IPI" to "debug IPI" since it might not be backed by > > > > > NMI. > > > > > > > > > > arch/arm64/kernel/ipi_debug.c | 5 +++++ > > > > > arch/arm64/kernel/kgdb.c | 14 ++++++++++++++ > > > > > 2 files changed, 19 insertions(+) > > > > > > > > This looks fine to me, but I'd feel a bit happier if we had separate > > > > SGIs for > > > > the backtrace and the KGDB callback as they're logically unrelated. > > > > > > Well, we're a bit stuck here. > > > > > > We have exactly *one* spare SGI with GICv3, as we lose 8 of them > > > to the secure side. One possibility would be to mux some of the > > > lesser used IPIs onto two SGIs (one with standard priority, and > > > one with NMI priority). > > > > Understood; Doug and I suggested two options for that: > > > > 1) Unify/mux the IPI_CPU_STOP and IPI_CPU_CRASH_STOP IPIs > > > > The only *intended* difference between the two is that > > IPI_CPU_CRASH_STOP > > calls crash_save_cpu() before trying to stop the CPU, but the > > implementations have diverged significantly for unrelated reasons. > > > > 2) Remove IPI_WAKEUP > > > > We only use IPI_WAKEUP for the ACPI parking protocol, and we could > > reuse > > another IPI (e.g. IPI_RESCHEDULE) to achieve the same thing witout a > > dedicated IPI. > > Sure. My concern is that we're papering over the fundamental problem, > which is that IPIs are limited resource, and that we're bound to pile > more stuff on them. > > I'm all for reclaiming the ones that can be merged, but we may ultimately > need a real fix for this. Sure; I will bear that in mind. Thanks, Mark.