From: Jonathan Cameron <jic23@kernel.org>
To: sashiko-bot@kernel.org
Cc: sashiko-reviews@lists.linux.dev,
"Guixin Liu" <kanie@linux.alibaba.com>,
linux-cxl@vger.kernel.org
Subject: Re: [PATCH v2] cxl/region: Create node access attributes for CFMWS-only NUMA nodes
Date: Thu, 17 Sep 2026 22:06:24 +0100 [thread overview]
Message-ID: <20260917220624.459e8065@jic23-hlaptop> (raw)
In-Reply-To: <20260917030049.BD8711F000FF@smtp.kernel.org>
On Thu, 17 Sep 2026 03:00:49 +0000
sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] cxl/region: missing access attributes for SRAT nodes without HMAT
> --
>
> commit 2503e3249f202233ccb3653d33cc651692452053
> Author: Guixin Liu <kanie@linux.alibaba.com>
>
> cxl/region: Create node access attributes for CFMWS-only NUMA nodes
>
> A NUMA node that only backs a CXL fixed memory window and is not
> enumerated by SRAT has no memory_target in the HMAT code, so
> hmat_callback() exits early at find_mem_target() and never creates
> the node's accessN attributes. Create the attributes with
> node_set_perf_attrs() when the node is not backed by a real SRAT pxm.
>
> > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> > index f54acbf68e844..5ef0ca0694ff1 100644
> > --- a/drivers/cxl/core/region.c
> > +++ b/drivers/cxl/core/region.c
> [ ... ]
> > @@ -2631,7 +2632,19 @@ static bool cxl_region_update_coordinates(struct cxl_region *cxlr, int nid)
> >
> > for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) {
> > if (cxlr->coord[i].read_bandwidth) {
> > - node_update_perf_attrs(nid, &cxlr->coord[i], i);
> > + /*
> > + * A CFMWS-only node (not backed by a real SRAT pxm)
> > + * has no HMAT memory_target, so hmat_callback()
> > + * never created the access attributes for it:
> > + * create them here instead of only updating them.
> > + * This is called at most once per node (see
> > + * nodemask_region_seen), so the attributes are not
> > + * created twice.
> > + */
> > + if (!acpi_node_backed_by_real_pxm(nid))
> > + node_set_perf_attrs(nid, &cxlr->coord[i], i);
> > + else
> > + node_update_perf_attrs(nid, &cxlr->coord[i], i);
>
> [Severity: Medium]
> Will this silently drop access attributes for SRAT nodes that lack HMAT
> entries?
>
> If the system provides an ACPI SRAT table that enumerates a NUMA node,
> acpi_node_backed_by_real_pxm() will return true. However, if there is no
> corresponding HMAT table or entry, hmat_callback() exits early and never
> calls node_set_perf_attrs() to create the node's access attributes.
>
> When CXL regions later come online, cxl_region_update_coordinates() checks
> acpi_node_backed_by_real_pxm(), which evaluates to true. It therefore calls
> node_update_perf_attrs() instead of node_set_perf_attrs().
>
> Because the attributes were never created, node_update_perf_attrs() finds
> an empty node->access_list and silently returns, which drops CXL access
> coordinate sysfs attributes and NUMA mempolicy updates. Using an ACPI
> topology check to guess the initialization state of generic struct node
> sysfs attributes leaves the underlying bug unresolved for standard SRAT
> nodes lacking HMAT data.
>
If there is no HMAT, there is no perf data to the generic ports and
none of this can be created or updated anyway.
Jonathan
> > cset++;
> > }
> > }
>
next prev parent reply other threads:[~2026-09-17 21:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 2:46 [PATCH v2] cxl/region: Create node access attributes for CFMWS-only NUMA nodes Guixin Liu
2026-09-17 3:00 ` sashiko-bot
2026-09-17 21:06 ` Jonathan Cameron [this message]
2026-09-17 3:05 ` Gregory Price
2026-09-17 22:44 ` Alison Schofield
2026-09-18 15:39 ` Dave Jiang
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=20260917220624.459e8065@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=kanie@linux.alibaba.com \
--cc=linux-cxl@vger.kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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