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 F2A8631AAAA for ; Thu, 26 Feb 2026 10:53:27 +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=1772103209; cv=none; b=kfInLnyPMvRqpTxAV/ZJ0a8zYDGnJ5s4HLQ9U38M1FGzT4Gv13aey48WjBI2XpQbnNUn9Bxv8sBqFaBd+41jt82HxVTpHaOdQT2r1IG6Kgu5Q8crogbj5H28hgMRtq13dAab7cCKzzxnLIb6lgGJXOtA3ovMT759cjLdLA1Pk9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772103209; c=relaxed/simple; bh=zcjMUMP1iD1ffiiSMYf1HhQiAP08HqSQ1NKVOx3be6w=; h=Message-ID:Date:From:To:Cc:Subject; b=tSDIe5OSEjXvtB/DEnQbNfLidCtayipiirGPNHF//YaqoR5dB9dR5tIZevteEJL6X0wAe99ethNE45RChG4JswgHPIQZsIBXZJ0igTJ38kvGhwgNGEi2T3eBM5p1sJ4orXe5xs7I9G8c9aFuxK4Eb/uowLc2MgMI4MPS/DsRf5A= 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=Z/oY0WcM; 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="Z/oY0WcM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=zcjMUMP1iD1ffiiSMYf1HhQiAP08HqSQ1NKVOx3be6w=; b=Z/oY0WcM5M3DpKVZgBb3T9PtPQ hOmlFwuP3sYnYXXBeXvyPdsxOowZpcoHwcscnbI0rUhwXFvNC69nCOJlTKi/FsEdEbmErip4XG7yq V58kJ+boaWMSoQv6huV1l0SHp92YlrRPbxquoW7AlFM9SXxVgInLp3P0KKATdaiWhdXz7HWq+QhHV qqG3CpJiO9gfvh3yiGRZZHvf0M+B2VkFI3FXEJm6agM/j2b1uAIXi/G+r5v7Lh+SBeIpbRrQ7SQ16 q3tITfwIKlPeywvWE0rfWQ1w8KsWilzbnY6qktO9aK1BM21s6c6O8qbMtylPtVq/2/2on9+bgTpbY lkvaIOwg==; 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 1vvYzg-0000000AmI8-3Iai; Thu, 26 Feb 2026 10:53:20 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 085C6300BDE; Thu, 26 Feb 2026 11:53:19 +0100 (CET) Message-ID: <20260226104909.675623579@infradead.org> User-Agent: quilt/0.68 Date: Thu, 26 Feb 2026 11:49:09 +0100 From: Peter Zijlstra To: x86@kernel.org, tglx@kernel.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.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 Subject: [RFC][PATCH 0/6] x86/topo: SNC Divination Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi! So we once again ran head-first into the fact that the CPUs fail to enumerate useful state. This time it is SNC (again). Thomas recently rewrote much of the topology code to use MADT and CPUID to derive many of the useful measure of the system *before* SMP bringup. Removing much broken magic. Inspired by that, I wondered if we might do the same for SNC. Clearly MADT is not sufficient, however combined with SRAT we should have enough. Further luck will have it that by the time MADT gets parsed, SRAT is already parsed, so integrating them is mostly straight forward. The only caveat is that numa_emulation can mess things up in between. Combining all this gives a straight forward measure of nodes-per-package, which should reflect the SNC mode. All before SMP bringup. Use this to 'fix' various SNC snafus. Compile and boot tested on non SNC only for now; I'll see if I can convince qemu to play along.