From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55075C04FE0 for ; Mon, 7 Aug 2023 11:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GWmXWHqQx4yBUROwslyjkM/msDe/qlldzqDXbhr3+5Y=; b=F821diYkcXEgTp awRCB8oFNFXHnxC26W2TGJhpBFrjlMpiOG3lqAE4hgCUhIjCuG/kRKDGg21frE0pocY0iNZWLENZW rA1secjhgLFVEee5lmIYVHx60yPhZSr6Rblim89m2RV2k/1f+IoVXix1wDB7U7WjH3jomqIrKiQoE gdq1X9tboGjH1m0pjtrshIkJkYD8Se9CqjDCQAyTsi/CLt2LivRnUp1LrKLg+yCSU3xrHxusuZceK qN0RNYUBGBxx6OQZ09A1aMrzvNm++Rx0dnB0BO8DmQ+qW9lmecBFJpaWv1DpKmhO7jGnUjQ051xAc Q/LNx/AUTBox56RWAJDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSyBd-00H0jr-1K; Mon, 07 Aug 2023 11:14:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSyBZ-00H0gO-28 for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 11:14:07 +0000 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-Disposition: inline In-Reply-To: <7a295fcb4ff02542ff6835a77182fce8@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230807_041405_814764_48A69F8C X-CRM114-Status: GOOD ( 33.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel