From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BFFD3410D00 for ; Mon, 2 Mar 2026 15:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772464248; cv=none; b=GqU14b0GAthuBXtYs9+yLfGXK3jRfgAgiEjyJJDrsbXziZaRfPtsAang9fMtzki2Aj4WFtMwNrr40ShW69qU8UubIiYNz0jLfFJh151LGLOQiCIZCKcghms0vVhOdNXkpJxecKW72s/58iGueasJyN7/yJKuugQ33eXs3Ulu5Lg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772464248; c=relaxed/simple; bh=OV0ZNVwLi1GzipGPwu0DrEe+HNbfHpuO7lwl7IEgFZQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U2w7SO2GgXheGcOSMofLV/1m7NOVg+i8Ran4ct2PUstGoHHlMe8DbJn9YpB1GhAflCc5i66aplu2WAZMrvIIPaV5qi6mnIkfVJiLWyKxt1p8z4DlJcB/lFD96WgR3Zsi27DzeOyB4dFN1PGoz1xraRleVaz5SqiUgYw7OTcWhlE= 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=i4KteGCW; arc=none smtp.client-ip=90.155.92.199 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="i4KteGCW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=zWMsL8+778XNtymgA1X7iwKNSIAHJ8YO68klph6MinA=; b=i4KteGCWjcdQpIKHjFoBxFjpFw 4ZaQpE0x6dRyPRPqLGU9kuemudUG4LtQPs/hst9aDaYDh1ljOEVLOfh76o9SithUo6QnuKYZBg/Wn fWg1+Jk4dovxZd64cWV7MjCA2EeoJ+E6jIVuJ6Z25GOYJ9zGPtVTu/K34i0tJdmVUB6i7FM+ib7NA 9SJe//PSyij/Tj9J7dY1R7VBtuaBJMXhkePNi5rFIywVjMzq9E6BEjwNlNLCD5OJX3JJvye2UAOCf VSoUtXtMAH694SUQQ9HZDatZYRBz3Jc4hkTeUiTPgBBFGwTw0vayIjiLVkrJRm853stZ08MLP0Dwy /WDSRL8w==; 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 desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vx4uo-00000000Olz-35Du; Mon, 02 Mar 2026 15:10:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 44B8D300B40; Mon, 02 Mar 2026 16:10:34 +0100 (CET) Date: Mon, 2 Mar 2026 16:10:34 +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: <20260302151034.GO1282955@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> 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: <8b8e7b6f-c874-48d5-8402-77eca5425b1d@amd.com> On Mon, Mar 02, 2026 at 09:46:57AM +0530, K Prateek Nayak wrote: > Hello Peter, > > On 2/27/2026 7:36 PM, Peter Zijlstra wrote: > >> Looking at the series, all we need is an equivalent of: > >> > >> domain_weight(TOPO_NUMA_DOMAIN) > > > > Fair enough; but then lets replace patch 1 and 2 with something like > > that. > > > > But I must note that the nodemask API is crap; it has both node_set() and > > __node_set() be the atomic version :-( > > > > Let me go rework the other patches to fit on this. > > Boots fine with a s/domain_weight(TOPO_NUMA_DOMAIN)/num_phys_nodes()/ > applied to Patch 3. > > Topology looks fine for NPS4 on my 3rd Generation EPYC with 2 sockets, > and I haven't triggered any warning even with "L3 as NUMA" turned on. > Feel free to include: > > Tested-by: K Prateek Nayak Thanks! 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!) - 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) ?