From: Haifeng Xu <haifeng.xu@shopee.com>
To: rafael@kernel.org, lenb@kernel.org, dan.j.williams@intel.com,
jonathan.cameron@huawei.com
Cc: dave@stgolabs.net, dave.jiang@intel.com,
alison.schofield@intel.com, vishal.l.verma@intel.com,
ira.weiny@intel.com, linux-cxl@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: add a boot parameter to disable parsing CFMWS during NUMA init
Date: Wed, 4 Mar 2026 15:55:23 +0800 [thread overview]
Message-ID: <751572d2-2665-4a67-8098-2f3a69668e0f@shopee.com> (raw)
In-Reply-To: <20260304064609.75585-1-haifeng.xu@shopee.com>
On 2026/3/4 14:46, Haifeng Xu wrote:
> For the machine Intel(R) Xeon(R) 6746E that supports CXL memory,
> the possible node is 20 (0-19). However, only two numa nodes (0-1)
> have memory and the rest (2-19) nodes detected by CEDT is memoryless.
>
> The problems is that when creating many pods, the shrinker map size
> need to be expanded for all memory cgroups in expand_shrinker_info().
> If the number of possibles nodes is too large, the holding time of
> shrinker lock grows significantly.
>
> In this case, there is no CXL memory inserted in the machine, those
> memoryless nodes are useless for us, so there is no need set them to
> 'numa_nodes_parsed'. After disabling parsing CFMWS, the pod creation
> time is reduced from over 10 minutes to approximately 150 seconds in
> our intertel test.
>
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
> ---
> drivers/acpi/numa/srat.c | 29 ++++++++++++++++++++++-------
> include/acpi/acpi_numa.h | 6 ++++++
> 2 files changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c
> index aa87ee1583a4..8716d70043fe 100644
> --- a/drivers/acpi/numa/srat.c
> +++ b/drivers/acpi/numa/srat.c
> @@ -31,6 +31,7 @@ static int node_to_pxm_map[MAX_NUMNODES]
>
> unsigned char acpi_srat_revision __initdata;
> static int acpi_numa __initdata;
> +static int cfmws_numa __initdata;
>
> static int last_real_pxm;
>
> @@ -39,6 +40,12 @@ void __init disable_srat(void)
> acpi_numa = -1;
> }
>
> +void __init disable_cfmws(void)
> +{
> + cfmws_numa = -1;
> +}
> +
> +
> int pxm_to_node(int pxm)
> {
> if (pxm < 0 || pxm >= MAX_PXM_DOMAINS || numa_off)
> @@ -313,6 +320,12 @@ int __init srat_disabled(void)
> return acpi_numa < 0;
> }
>
> +int __init cfmws_disabled(void)
> +{
> + return cfmws_numa < 0;
> +}
> +
> +
> __weak int __init numa_fill_memblks(u64 start, u64 end)
> {
> return NUMA_NO_MEMBLK;
> @@ -648,14 +661,16 @@ int __init acpi_numa_init(void)
> */
>
> /* fake_pxm is the next unused PXM value after SRAT parsing */
> - for (i = 0, fake_pxm = -1; i < MAX_NUMNODES; i++) {
> - if (node_to_pxm_map[i] > fake_pxm)
> - fake_pxm = node_to_pxm_map[i];
> + if (!cfmws_disabled()) {
> + for (i = 0, fake_pxm = -1; i < MAX_NUMNODES; i++) {
> + if (node_to_pxm_map[i] > fake_pxm)
> + fake_pxm = node_to_pxm_map[i];
> + }
> + last_real_pxm = fake_pxm;
> + fake_pxm++;
> + acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
> + &fake_pxm);
> }
> - last_real_pxm = fake_pxm;
> - fake_pxm++;
> - acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
> - &fake_pxm);
>
> if (cnt < 0)
> return cnt;
> diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> index 99b960bd473c..2435f60e56ce 100644
> --- a/include/acpi/acpi_numa.h
> +++ b/include/acpi/acpi_numa.h
> @@ -21,6 +21,7 @@ extern int fix_pxm_node_maps(int max_nid);
>
> extern void bad_srat(void);
> extern int srat_disabled(void);
> +extern void disable_cfmws(void);
>
> #else /* CONFIG_ACPI_NUMA */
> static inline int fix_pxm_node_maps(int max_nid)
> @@ -30,6 +31,11 @@ static inline int fix_pxm_node_maps(int max_nid)
> static inline void disable_srat(void)
> {
> }
> +
> +static inline void disable_cfmws(void)
> +{
> +}
> +
> static inline int pxm_to_node(int pxm)
> {
> return 0;
Sorry, This patch is deprecated. I'll send a new one.
next prev parent reply other threads:[~2026-03-04 7:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 6:46 Haifeng Xu
2026-03-04 7:55 ` Haifeng Xu [this message]
2026-03-04 8:06 Haifeng Xu
2026-03-04 14:10 ` kernel test robot
2026-03-04 15:11 ` kernel test robot
2026-03-04 17:16 ` Gregory Price
2026-03-05 4:18 ` Haifeng Xu
2026-03-05 6:30 ` Gregory Price
2026-03-05 7:43 ` Haifeng Xu
2026-03-05 19:57 ` kernel test robot
2026-03-05 20:19 ` kernel test robot
2026-03-05 23:00 ` kernel test robot
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=751572d2-2665-4a67-8098-2f3a69668e0f@shopee.com \
--to=haifeng.xu@shopee.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=vishal.l.verma@intel.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
all inboxes | Powered by JetHome®