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 705633E5EF5 for ; Tue, 3 Mar 2026 11:05:24 +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=1772535925; cv=none; b=EgbfS8cTHknkvga8sQGYku6pE+7rEBXthNvJhjGAR0u/z4wXI6XkDD5FXI+v+foWSj+5Y+jIXDyEbFsJBihKhsS1DupokJJcEvZUUDKsUmVF4l7F3mMraViwm2jCwoPocs0bkUFRqJ/qAmCbGPFN2hMXgG6wnjLT/KExskvKv98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772535925; c=relaxed/simple; bh=PcsGYHEpAebEmv1VSYbTCZf7yfZ50nHwBzp0gFule+k=; h=Message-ID:Date:From:To:Cc:Subject; b=GGlvoFbGUKjklAaDVNnrvfuG17x/6JXeKXPU0ECXV2/+uqb02eUjSgbhk96TWyuu4lWIQxGXTbl0/TP2gXfgnus1gZBJe1zu/fJ5ERm4ftaC/xayamEWqAFjdk8VtlXpfHeAvkGlUlktw8KFdou23r9xDRvbfGnwxh6ZPBSd3+0= 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=ji6nZwYv; 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="ji6nZwYv" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=Te++d99ZJltaSFKlnq5B/AEY9oBY9GUcRPPZlLrg4VE=; b=ji6nZwYvXk7yZtzpn+5y0TtJdX KptBL6uUXnnmQNnag7sIp1TaI7q9oOJOum0lRSbmqxzqz2GiN/rbXpT6hvVuhqj+Qqh9A3uhHgUvW Z8gGN0DISZO32pn5uwDy2JJO0PDqU5F37T4nENYun5WU4JD2okdUem6lVyf+yZ8OBs5fMWHae+9y0 9mei7+WTiG4UByZjyKAlhD7IBLwSjoxgfEvKIQ1Ebj2XfQ3kJn2EwahXy17Vt0cHbyOHNUWEd/P3d vqk0JnQcUoF0TX9UqqFosmrb5N+aOz6cgJR2z35IlbGd5VMBKcjG/2wsWNffCeairKLbcg1Y1mwL+ 0kP8erEw==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vxNYu-0000000BNmg-0W3m; Tue, 03 Mar 2026 11:05:12 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 205C3300666; Tue, 03 Mar 2026 12:05:09 +0100 (CET) Message-ID: <20260303105539.428037056@infradead.org> User-Agent: quilt/0.68 Date: Tue, 03 Mar 2026 11:55:39 +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: [PATCH v2 0/5] x86/topo: SNC Divination Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi! Extend Thomas' MADT time topology code to include SRAT based node counts to provide a boot time based: topology_num_nodes_per_package(). This provides a best effort estimate for things like Intel CoD/SNC and AMD NPS modes that are not otherwise enumerated. Use this measure to address various SNC snafus. v1: https://lkml.kernel.org/r/20260226104909.675623579@infradead.org --- arch/x86/include/asm/numa.h | 6 ++ arch/x86/include/asm/topology.h | 6 ++ arch/x86/kernel/cpu/common.c | 3 + arch/x86/kernel/cpu/resctrl/monitor.c | 36 +------ arch/x86/kernel/cpu/topology.c | 13 ++- arch/x86/kernel/smpboot.c | 198 ++++++++++++++++++++++++---------- arch/x86/mm/numa.c | 8 ++ arch/x86/mm/srat.c | 2 + 8 files changed, 184 insertions(+), 88 deletions(-)