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 3EE58C001DB for ; Tue, 8 Aug 2023 11:17:37 +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=xU5aZcA7MFyIl8udj6tkePid1RDy7rtdynHT7a4Acz0=; b=eeksfI+v5nabnd 4VPyfEQuI+ERKt7eyY7y2eYEozy3QCUMWphwL/X6v43cagLnbwXH6nl6cdrWAcHsHqU7R88O0fZWj pcslYie5N7J5kFVC+AfLe6K7BCGy5uAguJAV6MOveUZ4lPLtcNl1+uLNKYK2/ZWKurVMvfGjh0NzV VfuSv5g0K8PVjAP+q5vW7JPqeQ477QTWfyTxG2J7xkDaRYUZQwWQHRR3EXKrSq9JELhmI3P9L8qc0 4unBB4fv25pK2j0I4b92G/SUK+YwQYNkZA0EkL7hMuc6/b9mYGQXapU8t0NDdKqkb6lCbrh4Oyx7e d/lfnTDoGRwQpzn4gr6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTKi8-002SGJ-2e; Tue, 08 Aug 2023 11:17:12 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTKi5-002SFa-2O for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 11:17:11 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b9dc1bff38so86129561fa.1 for ; Tue, 08 Aug 2023 04:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691493425; x=1692098225; 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=uf6Qwp5IcBfnw8cvFBZLBD+6OL+Kh6Nn1R+GOEG85Xs=; b=URhpTg4LOZwVyZFbIWLeOUAjO1te4XCx6hZWhPA/U2jQ/X2eu3YW2viI+s9T+THIN3 ttJ+6iDXZzS9T/IU/uhQ8Lt6tbdWrXkpXmlaEM4xKnDYig+KgpJHF7Nx/DDoJF53MGt6 OIoQBmHBu8Ms/JtBE3rgODknt3g6R+IUg3ZIa8ggksCt2+A/24QpwJQ58jJeJxetqofW twuWBn3Y2dE5q5aPPO/my4x1D7mGAarJxOlFf3H/TRo2BBAtHExjYM4UGrlS+/9w/PS7 m5Rj9lIVA7Nmhxe0Rj018A5EdAagJRdYwEAit0Aq2gXqqIhIjNv7IQJY4Rwl5EAOL2sj mICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691493425; x=1692098225; 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=uf6Qwp5IcBfnw8cvFBZLBD+6OL+Kh6Nn1R+GOEG85Xs=; b=EVGDNnH7b2SyLaNwXa+zFJI1gbxRpwP86r1ZUOlQAE6le7f1YmkJJVReUytq2am8tB 8oa+XSOBa1pPCOnyMxzPrguXijBari5S93wPS0x0FiaiXtXJwmxlISX1msLHEtHp+Hoc L/Pddb7/umtNwo+ccVHdeK/IXmIbjjNh5BC+FNk0rvuXlaSywkk+kZo2SgBgJ6ULcrFx LgGi93wDxZ7mP+CzMTsS06+oCNXrtI0ktMdtLyz58n5eXWjb7lo/qLRsCm6uDlif9ggx 5hN8TzzLwd4eHN8uAoACcHAMxd3hTnsC9KZqtpU2w5nIMx+SCpS8H1yvp+n/3cv+zAkj vOYg== X-Gm-Message-State: AOJu0Yz38xdSX1ArPuQCnvi6Ia7gDlxAdEEomGwEvioR0gzbpj+s3Du4 8Y9JBYjN+y1fmL+NbMrTvhx6IA== X-Google-Smtp-Source: AGHT+IEoY3AsYBoeqi4l/r6UwxzB9eht2nw5J7VW0R/XG0aViKCtpjVte+QLSioXOu6hnHCUhQPKuQ== X-Received: by 2002:a2e:3004:0:b0:2b4:6d59:7863 with SMTP id w4-20020a2e3004000000b002b46d597863mr8284441ljw.25.1691493425593; Tue, 08 Aug 2023 04:17:05 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id q7-20020a1cf307000000b003fa98908014sm17836323wmq.8.2023.08.08.04.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 04:17:05 -0700 (PDT) Date: Tue, 8 Aug 2023 12:17:03 +0100 From: Daniel Thompson To: Mark Rutland Cc: Douglas Anderson , Catalin Marinas , Will Deacon , Sumit Garg , 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 , Wei Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 7/7] arm64: kgdb: Roundup cpus using the debug IPI Message-ID: <20230808111703.GB411689@aspen.lan> References: <20230601213440.2488667-1-dianders@chromium.org> <20230601143109.v9.7.I2ef26d1b3bfbed2d10a281942b0da7d9854de05e@changeid> <20230807152444.GA375529@aspen.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_041709_807137_7FA8861C X-CRM114-Status: GOOD ( 33.44 ) 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 05:04:14PM +0100, Mark Rutland wrote: > On Mon, Aug 07, 2023 at 04:24:44PM +0100, Daniel Thompson wrote: > > On Mon, Aug 07, 2023 at 11:28:52AM +0100, 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. > > > > I've no objections to seperate SGIs (if one can be found) but I'm curious > > what benefit emerges from giving them seperate IPIs. > > Mostly an "I'd feel happier"; they're logically unrelated and having them > separate avoids the risk of them unintentionally getting in the way of the > other. > > > Both interfaces are already designed to share and NMI-like IPI nicely > > (and IIUC they must share one on x86), neither is performance > > critical[1] and the content of /proc/interrupts for the IPI is seldom > > going to be of much interest. > > Sure; I understand that. The flip side of "neither is performance critical" is > that they're seldom tested in terms of interaction with one another, and hence > for robustness I'd prefer they're separate. We can't really stop them interacting when kdb is enabled: both activate special logic to intercept console messages and this is much more complex than the "is this my IPI?" tests. > I agree it's not strictly necessary, but given we can easily free up an SGI > slot, I think it'd be worthwhile. We can always decide to fold them together in > future if we have to. Agreed. It should be very little bother to "reclaim" an IPI from the diagnostics machinery if that is ever needed. So seperate IPIs is no problem from my point of view. Daniel. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel