public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: "Huang, Kai" <kai.huang@intel.com>,
	"gourry@gourry.net" <gourry@gourry.net>
Cc: "nunodasneves@linux.microsoft.com"
	<nunodasneves@linux.microsoft.com>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"Schofield, Alison" <alison.schofield@intel.com>,
	"thorsten.blum@linux.dev" <thorsten.blum@linux.dev>,
	"wangyuquan1236@phytium.com.cn" <wangyuquan1236@phytium.com.cn>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"xueshuai@linux.alibaba.com" <xueshuai@linux.alibaba.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>
Subject: Re: [PATCH] ACPI: NUMA: Only parse CFMWS at boot when CXL_ACPI is on
Date: Wed, 4 Mar 2026 17:29:32 -0800	[thread overview]
Message-ID: <69a8dc7ca72c2_2f4a10026@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <178a85c1d5a48938bf866a85d34ee2ba87901d10.camel@intel.com>

Huang, Kai wrote:
> On Wed, 2026-03-04 at 19:29 -0500, Gregory Price wrote:
> > On Thu, Mar 05, 2026 at 12:14:52AM +0000, Huang, Kai wrote:
> > > On Wed, 2026-03-04 at 18:56 -0500, Gregory Price wrote:
> > > > 
> > > > This basically says if specifically CXL_ACPI is built out, the NUMA
> > > > structure is forever lost - even though it's accurately described by
> > > > BIOS.  
> > > > 
> > > 
> > > The normal NUMA info described in SRAT is still there.  It only avoids
> > > detecting CFMWS, which doesn't provide any NUMA info actually -- that's why
> > > kernel assigns a 'faked' NUMA node for each of them.
> > > 
> > > So we are not losing anything AFAICT.
> > 
> > Well, I'm mostly confused why there are CEDT entries for hardware that
> > presumably isn't even there - unless this platform is reserving space
> > for future hotplug.  
> > 
> 
> I think this should be the case.
> 
> > Just want to make sure we're not adjusting for
> > strange firmware behavior.
> 
> How to check whether it is "strange"?
>

So these are fine. These are CXL hotplug windows and the expectation is
that they *might* be populated in the future. SRAT can not make claims
about future CXL hotplug (see NOTE). So the expecation for CXL hotplug
is reserve some numa nodes that Linux can determine the affinity of
dynamically with HMAT Generic Port and device CDAT information.

NOTE: SRAT *does* make claims about the affinity of future *ACPI*
Hotplug, but in that case the platform statically knows something about
the configuration of memory that can possibly be plugged in the future.

> > You are taking something away by nature of compiling something out by
> > default that was previously not compiled out by default.
> 
> Yeah, and it is due to "there's a cost" if we don't compile out by default.
> 
> Hope that justifies?

I think it makes sense that if you disable CXL hotplug by setting
CONFIG_CXL_ACPI=n then no need to reserve numa ids. However, just do
something like this rather than add ifdefs to the code:

diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
index aa87ee1583a4..62d4a8df0b8c 100644
--- a/drivers/acpi/numa/srat.c
+++ b/drivers/acpi/numa/srat.c
@@ -654,8 +654,11 @@ int __init acpi_numa_init(void)
 	}
 	last_real_pxm = fake_pxm;
 	fake_pxm++;
-	acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
-			      &fake_pxm);
+
+	/* No need to expand numa nodes if CXL is disabled */
+	if (IS_ENABLED(CONFIG_CXL_ACPI))
+		acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
+				      &fake_pxm);
 
 	if (cnt < 0)
 		return cnt;

The call to acpi_table_parse_cedt() will get skipped and the code for
acpi_parse_cfmws() will get automatically compiled out of the file.

At the same time I doubt this patch provides end users much value in
practice as most distro kernels have CONFIG_CXL_ACPI, and the few end
users that have CXL are not going blink at the overhead to support the
full feature set.

Can you not just disable CXL support in the BIOS for your system and
avoid complicating this code path for a small win?

  parent reply	other threads:[~2026-03-05  1:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 21:33 [PATCH] ACPI: NUMA: Only parse CFMWS at boot when CXL_ACPI is on Kai Huang
2026-03-04 22:33 ` Gregory Price
2026-03-04 23:20   ` Alison Schofield
2026-03-04 23:56     ` Gregory Price
2026-03-05  0:14       ` Huang, Kai
2026-03-05  0:29         ` Gregory Price
2026-03-05  0:45           ` Huang, Kai
2026-03-05  1:05             ` Gregory Price
2026-03-05  1:29             ` dan.j.williams [this message]
2026-03-05  1:51               ` Huang, Kai
2026-03-05  2:08                 ` dan.j.williams
2026-03-05  2:22                   ` Gregory Price
2026-03-05  3:01                     ` dan.j.williams
2026-03-05 10:24                       ` Huang, Kai
2026-03-05  8:11         ` Haifeng Xu
2026-03-05 10:25           ` Huang, Kai
2026-03-05 11:26             ` Haifeng Xu
2026-03-05  0:04     ` Huang, Kai
2026-03-05  0:44       ` Alison Schofield
2026-03-05  1:12         ` Huang, Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69a8dc7ca72c2_2f4a10026@dwillia2-mobl4.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=gourry@gourry.net \
    --cc=kai.huang@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=rafael@kernel.org \
    --cc=thorsten.blum@linux.dev \
    --cc=wangyuquan1236@phytium.com.cn \
    --cc=xueshuai@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox