From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F665606A31A for ; Sun, 25 Oct 2026 10:48:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zkpkVJzT; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=e8vDzekx DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=tsnCsLRJX3cGobhkErKsRb+78VkAkwtRPAI8Bq+WfHs=; b=zkpkVJzTAiqpkNxiVYeVF8MhE+ zbc1aAB1+UwWejTfMRHdEQjmaQDuJZ8nfftIs9QS/cz16ZsBaSu6r/2z1vvTM9mZOQsOme66wGDpC apSqLLpC7RjKa+5IerMIV66IAIfB1o3OnaUNt3yaXDbVBE4AjG3P/95IUViR3oC153tB00vaugu98 7fjk6zzH7hHaVSTlVF+AfYaK5agCnyk5hzGOzsCVqwzkg4xCM7Cb0dlIoXhY8ECQakpNY1zothitm vAyWkBWNv9WhRVKMpVJZDpTELKBzr0JKvxUdpz0PZjUxxz26oyC8BYG1My+JFbIA6TZyXEH9OqFJo cbHAfntA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xKvmJ-00000000z1g-0rTt; Sun, 25 Oct 2026 10:48:39 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xKvmH-00000000z1H-3rVa for linux-arm-kernel@lists.infradead.org; Sun, 25 Oct 2026 10:48:37 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 462DF438A6; Sun, 25 Oct 2026 10:48:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8D261F01825; Sun, 25 Oct 2026 10:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792925316; bh=tsnCsLRJX3cGobhkErKsRb+78VkAkwtRPAI8Bq+WfHs=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=e8vDzekxZsGayye8bqAjZ824qHKKPwEGEXjDh1dJThPYD/XwvcujtXyaJGgoac1h1 +murFYLNqKMyjctskx0Cbzb3QRGEMA9OMKPrXtYUqGmgZ7ioGPOtelehrY2/PelpU0 KTWPzfNb2I3K9gB+WSzsMkmlA93KN3T38RlkYmtL1R5fPxXZwkgLPDki5fVOYWLSVX RfZN2O7OcdON80AUxNfs1MqkoRJm0jrRetzCvgxj69VVCjQiHvEGNFBnmRaneBBBzC gF97N8GueiiziKIeUP6dPlnsZ7YbFBqnWmbNT9mo0NxpiAqFa9B0pw6uGVI+cmj4gF G0i76z4OIHZMg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xKvmE-00000006wML-0QdC; Sun, 25 Oct 2026 10:48:34 +0000 Date: Sun, 25 Oct 2026 10:48:33 +0000 Message-ID: <867bj6ys1q.wl-maz@kernel.org> From: Marc Zyngier To: Joshua Machauer Cc: Thomas Gleixner , Radu Rendec , , , , Joshua Machauer Subject: Re: [PATCH] irqchip/gic-v3: Remember each CPU's redistributor from the init walk In-Reply-To: <20261023181510.50634-1-machaujo@amazon.de> References: <20261023181510.50634-1-machaujo@amazon.de> 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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Archived-By: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: machaujo@amazon.de, tglx@kernel.org, radu@rendec.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nh-open-source@amazon.com, machaujo@amazon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, 23 Oct 2026 19:15:10 +0100, Joshua Machauer wrote: > > From: Joshua Machauer > > On systems that give every CPU its own redistributor frame, a CPU coming Is there *any* sort of GICv3-based systems that do not match this description? > online finds its frame by walking the frames from the first one until > GICR_TYPER matches its affinity. CPU n therefore performs O(n) MMIO > reads, and bringing up N CPUs costs O(N^2). Secondary CPUs boot > serially, so all of it adds to boot time. > > gic_update_rdist_properties() already walks every frame once at boot. > Record each possible CPU's frame there and have gic_populate_rdist() try > it first, so bringing a CPU online costs one MMIO read. A CPU without a > recorded frame, such as an ACPI online-capable CPU absent at init, still > scans. > > Recording compares each frame's affinity against that of every possible > CPU. That is still O(N^2) work at init, but it reads cpu_logical_map[], > which stays in the cache, instead of device memory. > > The frame is kept apart from rd_base, which > inherit_vpe_l1_table_from_rd() reads as "this CPU has booted". But this is a pointless duplication of the existing tracking, which could equally be solved with a flag. I'm not opposed to this, even if the gains are vanishingly small. But it can't come at the cost of duplicated state. Thanks, M. -- Without deviation from the norm, progress is not possible.