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 4B183C48BF6 for ; Sat, 24 Feb 2024 10:41:55 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t7b863Bj7qHYibATxdox0ru7O0Lbmp0ml8f7R0nAdEg=; b=tNDwWaPFjuw0zD OiOjzwinMtdkr1bHYwBLDW3OFFZn/rjNe0p/3nlOHT+l1LCvcFfTCIVaJfspM1t+Jn8dcnTzm1SzQ 6btRLIuRUr2k+WZCoa7+IJLoB2FOeZzSefKZilvLcY3jsJ1Gv/rLtS895V6oj/B7OmNRudEiKx/YS dFEi0mj6eBRIOkvaUvTc6nxR7GUHxko+OdAZpnHA8uJ3Td4BxizZIPTXuMkKowWTaeKclQUXgOy0e GdHNy6YFDBcz1U14Ms3VJL9KPkIBn/UJa3cisiQk+K1Hn7EQOVhaOsPT7oCzHDfyaXgu4uLdsn765 cG1NCXdoBs/Ux5+dHG+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdpTW-0000000CcNr-43sj; Sat, 24 Feb 2024 10:41:46 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdpTT-0000000CcND-3xAG for linux-arm-kernel@lists.infradead.org; Sat, 24 Feb 2024 10:41:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id CF72CCE2169; Sat, 24 Feb 2024 10:41:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C44DC433F1; Sat, 24 Feb 2024 10:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708771300; bh=El8Tx8z+w76H7TlIq7DwaR1/BFADl77wHAkdidcCCz8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Uq2+nPV2qDwwRd+8SJWZySXM2Z+a7VuqZIuLvLBUsVm72UcgEzLzd6O+4FgUsAwol dqSU6YsThde29eWsnyRpckCzQWrMh8NwZ7zOdzesnILnuKtbLwbt4DN/6QzvUvsJ0e oXasKsvHbQwZlCRpVVAc2WkvEgkcoVfNh67W5HiWgWo0JpXxBGSur4dfWen0AiUUfC 3kfS5OVx9+qfov6D0xne2nZimNoepeBVtGcZkSg3lePyOkiF6hqWNp04b3YSf5uSlu IdiIKAZCMeHXcHYijfvEsbPgplSdwgj1TFVfOVD9lymGN9NPZkn5dZMHr9mFV+/uvj O+cyHr8F1D4GQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rdpTN-006Lh6-RL; Sat, 24 Feb 2024 10:41:37 +0000 Date: Sat, 24 Feb 2024 10:41:36 +0000 Message-ID: <87bk869man.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Thomas Gleixner , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, Jing Zhang Subject: Re: [PATCH 3/3] irqchip/gic-v3-its: Print the vPE table installed in redistributor In-Reply-To: <20240219185809.286724-4-oliver.upton@linux.dev> References: <20240219185809.286724-1-oliver.upton@linux.dev> <20240219185809.286724-4-oliver.upton@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, tglx@linutronix.de, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, jingzhangos@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240224_024144_350570_7AD828EB X-CRM114-Status: GOOD ( 25.41 ) 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, 19 Feb 2024 18:58:08 +0000, Oliver Upton wrote: > > Hindsight is 20/20 of course, but the recent vPE table programming bug > could've been root caused a bit more quickly if we print the table > getting installed at every redistributor. > > Promote to pr_info() and add some additional context, such as the > provenance of the installed vPE table. > > Signed-off-by: Oliver Upton > --- > drivers/irqchip/irq-gic-v3-its.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 63d1743f08cc..c3ef9665a2ad 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -2835,7 +2835,8 @@ static int allocate_vpe_l1_table(void) > u64 val, gpsz, npg, pa; > unsigned int psz = SZ_64K; > unsigned int np, epp, esz; > - struct page *page; > + struct page *page = NULL; > + bool from_its = false; > > if (!gic_rdists->has_rvpeid) > return 0; > @@ -2865,8 +2866,10 @@ static int allocate_vpe_l1_table(void) > return -ENOMEM; > > val = inherit_vpe_l1_table_from_its(); > - if (val & GICR_VPROPBASER_4_1_VALID) > + if (val & GICR_VPROPBASER_4_1_VALID) { > + from_its = true; > goto out; > + } nit: from_its = val & GICR_VPROPBASER_4_1_VALID; if (from_its) ... > > /* First probe the page size */ > val = FIELD_PREP(GICR_VPROPBASER_4_1_PAGE_SIZE, GIC_PAGE_SIZE_64K); > @@ -2945,9 +2948,12 @@ static int allocate_vpe_l1_table(void) > gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER); > cpumask_set_cpu(smp_processor_id(), gic_data_rdist()->vpe_table_mask); > > - pr_debug("CPU%d: VPROPBASER = %llx %*pbl\n", > - smp_processor_id(), val, > - cpumask_pr_args(gic_data_rdist()->vpe_table_mask)); > + pr_info("CPU%d: Using %s vPE table @%llx (%s)\n", > + smp_processor_id(), > + (val & GICR_VPROPBASER_4_1_INDIRECT) ? "indirect" : "direct", > + val & GICR_VPROPBASER_4_1_ADDR, > + (page) ? "allocated" : > + ((from_its) ? "inherited from ITS" : "inherited from RD")); >From past experience, having the vpe_table_mask value displayed did help tracking VPE table affinity bugs. This said, my problem with this patch is that we already have tons of these statement printed once per CPU/RD. This is really huge and accounts for a significant part of the boot time on large machines (64+ CPUs). Before we add more of those, I'd really want to have a way to tone them down and only print them at runtime *if* required by the user. Kind of a dymanic debug, but driven from the command-line and present early enough. What do you think? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel