From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FBD82DA757 for ; Fri, 6 Feb 2026 15:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770393195; cv=none; b=AJNjloQnVBdHTyS7joBGP+ALwxtlGQiOHYAH+OiiUVZkXVWRSUHHdO4QXSLdU9yeCNKNyKLNKC7YYpB7R4TIeLZ+Ao84lpT17v2SsCKOQJELg/Vzy1kZv5QIs2n75Md756Ey96MlWSABKjJwaMnlCRW3/XunP52igXN4xQxg+ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770393195; c=relaxed/simple; bh=4wWjMagyUrHFa6ykvR013drrWBoFX5wJB108jihgH2o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LA5nYUKUGUrtCQINECms2V9P7MU5hZ8gvFjQOJp416YJjtzwqtQz7ZwAsjoC0oSUTSquJykP6SDZ+Q8VHEBiwRjdZY0ytfF64hLOHQ9U4ONAKmrsZF+9wY2y5iY2Hha8TycVZGG4CfaL4utGpfFEUCSF46krqnih39yqa70h3Xk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=Af6TyqE6; arc=none smtp.client-ip=209.85.222.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="Af6TyqE6" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-8c5384ee23fso95154385a.1 for ; Fri, 06 Feb 2026 07:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1770393194; x=1770997994; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7podOaUCjU/O3I21k18RXk2UZLq1mKBY8Ro47wlihIQ=; b=Af6TyqE67CUBGVHxevIzSz+gmT1txQK41kf+3haMSoQ1HwC/tmtFGiW5EGT3AziPxo ovuO0PZpRATsVOQeLrK3tvNQm31yrepj789o+bvH9o3/d+DDrj/HUzkTXAvqEUffxYFi Xs1vp9T1osOFSuMtXXgfuf+8uC+eWZB1R6hbtKDl2sljMUEU9C6m1GBR4C2NmyoZpzmZ 6gUCGeH3CxJ9NDQYIcA+FsppWo4N3gCTq1jRhLXIlgY9BKQ/1ResZNfIcqBFFsRMZ60r z3KwJiSmW9SqDIc/S8OPT5N7yZZWPnjlPblwSvgsPww6BUvSNKDRJrdnzjBAxG64skyJ UFgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770393194; x=1770997994; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7podOaUCjU/O3I21k18RXk2UZLq1mKBY8Ro47wlihIQ=; b=EXJlGEdr6OE+FL7XMHx0JDXqnD4unpvIRuupGrYapFQQxUYyXltwrzliTMOxaHJ+2U sSwnNlFGPHsokUgUl05T4c0ar68ZdQCoGmQqKBIv+jFoE07/2TR2DMkh9tq9ZkFwK8Pc Wv8CGhf2l+ucYHsrdIKWMb3/wkX0EKXIqRKfIWreo3ed0Yr29huGaDq+GW0vDnE1R36L afHwpEqkgDUxPhbYxMH+rKQYmZiVDWWV9EiTeAq2llkICaGmz6vcDzsPOGYS5DzNzl+j mdwJXZyOWMnQzypWW9jYk/uMana1ReuUBqVDQTNB2Nw67nR86hUZ39pTMv0A2DnVvXfh fPTw== X-Forwarded-Encrypted: i=1; AJvYcCUdeDXFS5eWCTZoJZnOe8xbJsDP6FO2KAt8BqPe+G4aAaBt9m0vpRk6jVhF2OqlJn+27QJgsu2HYRJ8la4=@vger.kernel.org X-Gm-Message-State: AOJu0Yzvo6SlcKP7izBMsZ91qyZ+crLRlOT6u+veBj9sfJ1nYVI0vByf yn62hnIxOAN2S+opUwsj57FpyUE0aiA6t7t5GVu5g3eDYQKxTYm/VdE/Y1Pujc3XscV4P5+/wFd ZLbfiOgk= X-Gm-Gg: AZuq6aKYfSXukVq2GN8vjeDeQe6dAeQy9elAY2khKI4A7P6mKXNWY8hymFpdpa3wwyu hdUWWGtd1Bl9yRT115eTsu4pAGT+g6SZkN5ysm7SpcxF2jggv1l325j7uvn93D/7PeLfad7/fHM HQTyGagQ71PA3zn7XRxIHnY/UkCF1lRWnFx3/JwJzsucjIb53BNE2ankXaCCPvpPEspOPzSSu5f XI72gaqVfa2ILic5KOwAhSqf+F6FFDKH9NhtHYqL+dibS7/1HKoueTtqJExhIyUSgpwdHpDwWjI 6BFGjwL5SacSpsWTBSEFPUlS/cmd3VLpTBlmyPixrXTUSKaDsnaIt2LyGUEzQK/ABYuLsmWVJ9q 5AJsMuJF24aEdj5yxTDhRBs9UZySaOlHISSQQYO2ZFkOwTkxvEETc+y/VEm+8ycRf4j84mSJgmS tGPrwL/1RRU4ZMd0SwCPwjAN6tGa5riMDHLUPRbb2Z1mKarpuXuWdvMoRfev39dkUmITfOFw/fw UVvBBbFeQ== X-Received: by 2002:a05:620a:44cf:b0:8c6:a1d5:47e1 with SMTP id af79cd13be357-8caeeb4e117mr380491485a.9.1770393193829; Fri, 06 Feb 2026 07:53:13 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8caf9fdf739sm176815485a.41.2026.02.06.07.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 07:53:13 -0800 (PST) Date: Fri, 6 Feb 2026 10:53:11 -0500 From: Gregory Price To: Jonathan Cameron Cc: Andrew Morton , Cui Chao , dan.j.williams@intel.com, Mike Rapoport , Wang Yinfeng , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, qemu-devel@nongnu.org, "David Hildenbrand (Arm)" Subject: Re: [PATCH v2 1/1] mm: numa_memblks: Identify the accurate NUMA ID of CFMW Message-ID: References: <20260115101858.85fd7b8e837c1c92a4fdc5f0@linux-foundation.org> <696944eca1837_34d2a10056@dwillia2-mobl4.notmuch> <2d1e23ad-7ec1-483b-88b3-70ce19b69106@phytium.com.cn> <20260205145842.efb90572a902ae4c481e6ef6@linux-foundation.org> <20260206110305.00001fbb@huawei.com> <20260206150941.000028ae@huawei.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: <20260206150941.000028ae@huawei.com> On Fri, Feb 06, 2026 at 03:09:41PM +0000, Jonathan Cameron wrote: > On Fri, 6 Feb 2026 08:31:09 -0500 > Gregory Price wrote: > > Now a fun corner is that a node isn't created unless there is something > in it - the whole SRAT is the source of truth for what nodes exist > - so we need 'something' in it - a cpu will do, or a GI, probably a GP. > Otherwise memory ends up in node0. However, fallback lists etc happen > as normal when first mem in a node is added. > ... > For now I 'suspect' we could hack things to provide lots of waiting numa nodes > and merrily assign HPA into them as we like whatever SRAT provides > in the way of 'hints' :) > look at ACPI MSCT - "Maximum Proximity Domain Information Structure" ;] I don't remember reading anything in the ACPI spec that says something has to be ON any of these PXMs for it to be accounted for in the MSCT. Platforms can just say "Reserve that many Nodes". (Linux does not read this value, and on my existing systems, this number always reflects the number of actually present PXMs) --- We probably want to ignore that and just add this: CONFIG_ACPI_NUMA_NODES_PER_CFMWS int range 1 4 help This option determines the number of NUMA nodes that will be added for each CEDT CFMWS entry. By default ACPI reserves 1 per unique PXM entry in the SRAT, or 1 for a CXL Fixed Memory Window without SRAT mappings. This will reserve up to N nodes per CEDT entry, even if that CEDT has one or more SRAT entries. then in the acpi/numa/srat.c code that parses srat/cedt, just track the number of nodes over a CEDT range. for each srat: account_unique_pxm(pxm, srat_range) for each cedt: nr_nodes = unique_pxms(cedt_range) while (nr_nodes < CONFIG_ACPI_NUMA_NODES_PER_CFMWS) node = acpi_map_pxm_to_node(*fake_pxm++); if (node == NUMA_NO_NODE): err("Unable to reserve additional nodes for CXL windows") break; node_set(node, numa_nodes_parsed); nr_nodes++ This should fall out cleanly. The additional nodes won't be associated with anything, but could be used for hotplug - I imagine. ~Gregory