From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C84B317165 for ; Tue, 3 Mar 2026 11:59:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772539194; cv=none; b=QCdHiy4oImPFkz6VOK4C/+owCFcwhwWk3r5XXmsdc/0zn00hu3aDGam3H0bOimD5qe8G204B4VjKhdzxIsAR0kUiLG4O/i1HGxOe/cRDbBq3LfNKtT1O9syatPMbs582BywATYXFvlMLv01hiBVS6vh0PISmIG3omLAN6nTUJ8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772539194; c=relaxed/simple; bh=18IeBkQWZB5ePneUgA7mcpS32O7xyrui2mN3NCBpHEo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uCydWLB25/6AORvzEvmsPMCNTyFQBXPITOrFeFXqD+tMDN/zd0YibyQl/urRomX+8hi8epw+f1y1VPhjmWj1m0ywyCxakhoVf55gOgBHWulCsJ3cZdNwBWJBLBrrT6gcpo3O/TLzjxfwWCrPXYcUCZPFfOc7xJIdlEP04AF3/gk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tfTizs6U; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tfTizs6U" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D74B3C116C6; Tue, 3 Mar 2026 11:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772539193; bh=18IeBkQWZB5ePneUgA7mcpS32O7xyrui2mN3NCBpHEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tfTizs6UbutVK/fJ5ZesvFyGd35CFgmG40mXdO2b/TcHpSL4H64rm0exNjahFBVr7 7rXE7L8+jdONsr9xCPI+QVyNAIRyn75pYTL683V/ig6BagYv6lyuiMi6iQgQM1Mk1I aVbJL7KgpGZxATrehEWJT6A+oOz5RkKwIcvFIWZKL6UqF4713BNQD1bD2mRjfoDByC sIDIj0LMMR9LiBhqXTNTE8i1VXjkgKWj9iHbX4owLOAmZBjBPP1hGalYyIWL5yIz4n CdGaYHkeIyt6u/hyaq7VqCIdH26lQqrOAqJ5VHCEvq10232MKAn1vTw9uPbnp1yYqF 9xYCaoMhizehA== Date: Tue, 3 Mar 2026 12:59:46 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: x86@kernel.org, tglx@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, yu.c.chen@intel.com, kyle.meyer@hpe.com, vinicius.gomes@intel.com, brgerst@gmail.com, hpa@zytor.com, kprateek.nayak@amd.com, patryk.wlazlyn@linux.intel.com, rafael.j.wysocki@intel.com, russ.anderson@hpe.com, zhao1.liu@intel.com, tony.luck@intel.com, Zhang Rui Subject: Re: [PATCH v2 4/5] x86/topo: Fix SNC topology mess Message-ID: References: <20260303105539.428037056@infradead.org> <20260303110100.238361290@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260303110100.238361290@infradead.org> * Peter Zijlstra wrote: > +static u32 slit_cluster_package(int N) > +{ > + int u = topology_num_nodes_per_package(); > + u32 pkg_id = ~0; > + > + for (int n = 0; n < u; n++) { > + const struct cpumask *cpus = cpumask_of_node(N + n); > + int cpu; > + > + for_each_cpu(cpu, cpus) { > + u32 id = topology_logical_package_id(cpu); > + if (pkg_id == ~0) > + pkg_id = id; Nit: newline after the 'id' local variable definition. > + /* > + * Off-trace cluster. > + * > + * Notably average out the symmetric pair of off-trace clusters to > + * ensure the resulting SLIT table is symmetric. > + */ > + x = i - (i % u); > + y = j - (j % u); AFAICS that's an open-coded rounddown() from : x = rounddown(i, u); y = rounddown(j, u); right? With these addressed: Reviewed-by: Ingo Molnar Thanks, Ingo