From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 CC7FF3FD155 for ; Mon, 2 Mar 2026 16:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468952; cv=none; b=qX0Fcj1v8JL6h4UiXaPL84jOay6V6TbL4iJoZkASbeaCOc0WaKjzBiKo7St9De3AMqgkMYi9SLtdv2vc2hvnX7RCuUFNR+xfADl/c2Y5xlawdVE/RWu5Mhfbq/q3rnDMYrGl1VtuSVJPqYWbuXCB8kReFGdGL+fJg/eNOcOPyqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772468952; c=relaxed/simple; bh=Q8szUZORh3cVyJbKrMnS3Vv/PPPTeSlUDQqBlf+1ed0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OmAj6k7m6H39CWvNQ0eB458pBKALBc+vphuQ0gD2RYlJ9Cg2Qmf+rBIdUids0jdj2C2THdy1KSFp05dIaqt9SXYj1BwCIs+rxijcSBumV4l98NcVthlDIvWMmVcDHRG8r10bLYzXPs/DEiyEc8E9J8Y6vq6ohpZjhhDHROc3OZA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=vtzIGtQL; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vtzIGtQL" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HX1DM7LKm3P4SdN5jVt3JNgjvaD8DMk7FMIuhtvtpZk=; b=vtzIGtQLc5lCpYO9RGKIAJhmd2 gwc0v0WBW9JxdytAEvdnecrsCs/y1TiPf0KCSuJGyKy5yTLMd4tgUwrYjALAbHLNT7oyMiHVKjeLv pW1MJKfN64JLCWrP5gYviFYnQzXlr1hRHp47qmkj8Pnwtg2Jk+QlmhBhXn4ri3jZhiYBru3FGvinJ N8u34MQ4xfxwhAlxrVUN3uJXcbKWsNR8Mjr5fYf8s9u9ORYSFAbRpyXpKtbtb0LJH8jHsXjz3b0m+ B0hkLPOScief6ZZ6kN+DnZNVSUyizBEAFt8dEffqOyu3/AWDMvdgwIzNLXXnaRU1aeWVeEGlLVbtT Um+kO8iA==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vx68g-00000009lEO-0p3Z; Mon, 02 Mar 2026 16:28:58 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id A93493011E4; Mon, 02 Mar 2026 17:28:56 +0100 (CET) Date: Mon, 2 Mar 2026 17:28:56 +0100 From: Peter Zijlstra To: K Prateek Nayak 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, patryk.wlazlyn@linux.intel.com, rafael.j.wysocki@intel.com, russ.anderson@hpe.com, zhao1.liu@intel.com, tony.luck@intel.com Subject: Re: [RFC][PATCH 2/6] x86/topo: Add TOPO_NUMA_DOMAIN Message-ID: <20260302162856.GJ1395266@noisy.programming.kicks-ass.net> References: <20260226104909.675623579@infradead.org> <20260226105052.355756378@infradead.org> <76776da9-2552-49de-91c7-41e767c248fa@amd.com> <20260227140614.GF1282955@noisy.programming.kicks-ass.net> <8b8e7b6f-c874-48d5-8402-77eca5425b1d@amd.com> <20260302151034.GO1282955@noisy.programming.kicks-ass.net> 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: On Mon, Mar 02, 2026 at 09:05:03PM +0530, K Prateek Nayak wrote: > > I had a quick look at this NPS stuff, and that is more or less the same > > as the intel SNC thing. With two notable exceptions: > > > > - you've stuck to power-of-two numbers (good!) > > Yeah but "L3 as NUMA" on a 6CCX machines doesn't follow that :-( > Is there any implicit dependency there? > > P.S. All these configs are symmetric so those divisions should give the > correct results. Nah, the code here doesn't care. Specifically the case at hand was SNC-3, where we make one package have 3 nodes. > > - NPS0; I don't think Intel has anything like that (although I could be > > mistaken). > > > > Now, the __num_nodes_per_package is obviously not going to work for > > NPS0 (it bottoms out at 1). > > > > Should we look at adding something for NPS0, or has that not been needed > > (yet) ? > > Let me go boot into NPS0 to see what my machine thinks. But it shouldn't > do any harm right because of the DIV_ROUND_UP() right? Right, no harm. And I've since realized you can detect it by: num_phys_nodes() == 1 && topology_max_packages() == 2