From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (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 E928E1E22E9 for ; Mon, 2 Mar 2026 18:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.147.86 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772475707; cv=none; b=OgxTfICsmnKo7biZiSLbFrwtpgPORbr45JddL3eNhJ4HuJjWjQzxj3LeWKuw4VUEItN565ydcd99rpSy9mA9Ubk0WcyZ4FgKFxVSpnWzvIRaYnif8+SNbC2nwxveWIqbnYA8YzPOYN+WXkdJ4i6Pr1BCPrikzTdVIMBbtggfIeg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772475707; c=relaxed/simple; bh=bn3R/IVp/pueawvKlSP/y70flQYeLq8SfCpjpaWpOas=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WpL0DylNGFy4gYY9RBr4RC9V9U0GEMwvVWTB36O5EzsErmcEhf2WV/fB6guFti7ILaRgpB0L0/IY+PDO1K/dLg0iMCsnAA4N9AECr5kYC+W3yNKtDzqiMuLGUKS3kYA9MOl7wkdnL4lBJpvlPqxCfSraTEa4DYA68Xh21lCDyD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com; spf=pass smtp.mailfrom=hpe.com; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b=R04ACKfN; arc=none smtp.client-ip=148.163.147.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hpe.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b="R04ACKfN" Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 622HmkYO3686642; Mon, 2 Mar 2026 18:21:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pps0720; bh=O5Su/vXdhDXC7K3pc8NB4BZx0o 2MzeA5SbtXHfED+70=; b=R04ACKfNrpZXhkhOK0QD9r6cIbfHuRSBfhcyoDmShV q+YGNxZzfQv01w1ALYgmNKg7YRVy6P6hP4gMsRqWlpjn6DbPp7LEs1EgYCMrGmCN PSsuznKIwPJDglNO0+yEUpjDwPPrp+m7m6OZLrZYUIOqpBsamNzuYay5dP069iQ6 Hd8ofbrB2I//pxDrKWOMewOH3zOP6bHm1f+VYEKurJ9tY1U4TqPxLM/dywXsCwBr n0bW2EiegZaqKi4G9uwFu3ftNtrrIo1xUeJg7mGsGsJiGaoqxWnn2e/qw7GuNX4t p7nEGmN31Ia3HPRi8cjeiyk3OpoS2b5IxSEajyKuiKnw== Received: from p1lg14880.it.hpe.com (p1lg14880.it.hpe.com [16.230.97.201]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 4cnf9a8kbt-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 02 Mar 2026 18:21:12 +0000 (GMT) Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14880.it.hpe.com (Postfix) with ESMTPS id A3DC38014EE; Mon, 2 Mar 2026 18:21:11 +0000 (UTC) Received: from HPE-5CG20646DK.localdomain (unknown [16.231.227.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTPS id 3FE28811BE3; Mon, 2 Mar 2026 18:21:09 +0000 (UTC) Date: Mon, 2 Mar 2026 12:21:06 -0600 From: Kyle Meyer 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, 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: Re: [RFC][PATCH 0/6] x86/topo: SNC Divination Message-ID: References: <20260226104909.675623579@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: <20260226104909.675623579@infradead.org> X-Proofpoint-GUID: 4wnACw9zYmB1R1MXdQ-6QrAFRKig_Vaf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAyMDE0NSBTYWx0ZWRfX5pjo2bEYALpM WGNL8Ezd1++hPpWTgVsRVK4dkq0r76UAn/51R/fIi7WV450jVY3GNkG2kL+aPEpxjPirYaYludX tl/h3wzM8YBbFB+jU+YxKycvzpyvcJTFbnzAgu5+MUiZqeO9n5lRqRHLZ2xPRohprCOG7QNsNzm TgAm144dKeXEg/RuP9iZrStOCpZhpSKFRl53ZwXA78wCsS9F3GDBjKTQOsEaaivbPchMcy5nJ+K 7PxrDWAUIMjvE87KN7nZ1fErZmJJcpKXW4mmMnCkLCghKfnJLmEYvjufXLiDJhsIIM8+lMaYOrT CV+d/1mQfspx991FOcPHJZHw0cFPwzMfRMvGGl82uAlMk+P8h4bs5DFjLjXCGXe0Dm+WxGomDko fQwkzz5gbuLXHq9cZlk8rWjKBAxBb474DGv0oUQdoZcJsG1Ox3qj3NiQnSi28EtiSr9iuKuKAhE V/zf3skMryyAADORCwQ== X-Authority-Analysis: v=2.4 cv=NcfrFmD4 c=1 sm=1 tr=0 ts=69a5d518 cx=c_pps a=A+SOMQ4XYIH4HgQ50p3F5Q==:117 a=A+SOMQ4XYIH4HgQ50p3F5Q==:17 a=kj9zAlcOel0A:10 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gQcMVamqm3wCPoSYhaRC:22 a=RtSn8ETxjE2H05FtM2s8:22 a=MvuuwTCpAAAA:8 a=Y3wtXupne7a7TOotlp0A:9 a=CjuIK1q_8ugA:10 X-Proofpoint-ORIG-GUID: 4wnACw9zYmB1R1MXdQ-6QrAFRKig_Vaf X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_04,2026-03-02_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603020145 On Thu, Feb 26, 2026 at 11:49:09AM +0100, Peter Zijlstra wrote: > 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. Thank you for the series! Tested on a Sapphire Rapids system with SNC-4, SNC-2, and SNC disabled. Tested on a Granite Rapids system with SNC-2 and SNC disabled. The nodes per package were correct. I don't have access to a system with CXL attached memory. Tested-by: Kyle Meyer