From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792925316; b=g1Op7f7RhnyJB/nCHwM5MLBUF+Q6OPY56ZsKy4YqacX6usI4WEYiKUAP1O2rnh/n2yl/ /iIejB7a94GHuB5G221NL3uwtcvLBjonTLwI+Gygo121f1n0FlBdoiuJgQcVexfwjmaSk rXwFsfHmMMOWOx1VoLxw12BqXUbEPohlL8ttgQHslTG+W4KiWTqAQVnGeoZtvMTwrnZx+ ukW8kzfPPHd8tdtMVaATm3bcKp+jXen7Y1d6RwIdY1THMEPjfq66UhM73+TsBMjHpWkw6 A1jMQxzgt1jhgWJRL14zTAdiP6yGBDfhOMULvbrGJR7IywzvDjWsHrdKdDO0m8VGqEw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792925316; h=Received:DKIM-Signature:Received:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:User-Agent:MIME-Version:Content-Type: X-SA-Exim-Connect-IP:X-SA-Exim-Rcpt-To:X-SA-Exim-Mail-From: X-SA-Exim-Scanned; bh=tsnCsLRJX3cGobhkErKsRb+78VkAkwtRPAI8Bq+WfHs=; b=Lqnr3ngG0YTOPYz1AXDkV6K7gjVADkmIg0jLzaRFmIRwlWd9sNxCRtG1uk4bnKSOWE15 p6N6CMkK50J8uB2cyuv3w5yBAo3O7MVfUh8rsHSKb5wxYXfHc5dJy4QlMJQ3LOAMXOvr+ ZP58IIDinAmtGUMUS03QPYadSXcDQNTB45kGRpSOc6Q1giwr9+YhyK59tlnaefCALLH/H QLPcCNznBoKIVMvdC1VbT0b9AqzgYBP2s0E9AsyNnVPIUPqavYInEVR/5n0CJlRJui8AQ 8FssylkNTcz7CybKzwAmpCu5LQT7uTjmYhJah8prZ2iuoUXOfI0VHCOFPSd8fWkEDCg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=e8vDzekx; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5884F606A31A for ; Sun, 25 Oct 2026 10:48:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=e8vDzekx 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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.