public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Cc: linux-cxl@vger.kernel.org, linux-acpi@vger.kernel.org,
	dan.j.williams@intel.com, ira.weiny@intel.com,
	vishal.l.verma@intel.com, alison.schofield@intel.com,
	dave@stgolabs.net, rafael@kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH v5 12/12] cxl/region: Deal with numa nodes not enumarated by SRAT
Date: Tue, 20 Feb 2024 13:47:12 -0700	[thread overview]
Message-ID: <7b4f2506-2672-4569-9552-24ae92a4a3a4@intel.com> (raw)
In-Reply-To: <20240215172436.000064a7@Huawei.com>



On 2/15/24 10:24 AM, Jonathan Cameron wrote:
> On Tue, 6 Feb 2024 15:28:40 -0700
> Dave Jiang <dave.jiang@intel.com> wrote:
> 
>> For the numa nodes that are not created by SRAT, no memory_target is
>> allocated and is not managed by the HMAT_REPORTING code. Therefore
>> hmat_callback() memory hotplug notifier will exit early on those NUMA
>> nodes. The CXL memory hotplug notifier will need to call
>> node_set_perf_attrs() directly in order to setup the access sysfs
>> attributes.
>>
>> In acpi_numa_init(), the last proximity domain (pxm) id created by SRAT is
>> stored. Add a helper function acpi_node_backed_by_real_pxm() in order to
>> check if a NUMA node id is defined by SRAT or created by CFMWS.
>>
>> node_set_perf_attrs() symbol is exported to allow update of perf attribs
>> for a node. The sysfs path of
>> /sys/devices/system/node/nodeX/access0/initiators/* is created by
>> ndoe_set_perf_attrs() for the various attributes where nodeX is matched
> node
> 
>> to the NUMA node of the CXL region.
>>
>> Cc: Rafael J. Wysocki <rafael@kernel.org>
>> Reviewed-by: Alison Schofield <alison.schofield@intel.com>
>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Trivial comment inline.
> Otherwise LGTM
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
>> ---
>> v5:
>> - Fix ARM compile of missing prototype (0day)
>> ---
> 
> 
> 
>> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
>> index 19e419f18472..db51e35cb44f 100644
>> --- a/drivers/cxl/core/region.c
>> +++ b/drivers/cxl/core/region.c
>> @@ -3084,7 +3084,12 @@ 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) {
>> -			rc = cxl_update_hmat_access_coordinates(nid, cxlr, i);
>> +			rc = 0;
>> +			if (cxl_need_node_perf_attrs_update(nid))
>> +				node_set_perf_attrs(nid, &cxlr->coord[i], i);
> maybe
> continue;
> here

Whether we are updating the node attrs or the hmat perf attrs, we want to refresh the CXL sysfs attrs to make sure is_visible() has changed.

DJ
 
>> +			else
>> +				rc = cxl_update_hmat_access_coordinates(nid, cxlr, i);
>> +
> 
> Then no need to indent the above
> 
>>  			if (rc == 0)
>>  				cset++;
>>  		}
> 

      reply	other threads:[~2024-02-20 20:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 22:28 [PATCH v5 0/12] cxl: Add support to report region access coordinates to numa nodes Dave Jiang
2024-02-06 22:28 ` [PATCH v5 01/12] ACPI: HMAT: Remove register of memory node for generic target Dave Jiang
2024-02-15 16:20   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 02/12] base/node / ACPI: Enumerate node access class for 'struct access_coordinate' Dave Jiang
2024-02-15 16:24   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 03/12] ACPI: HMAT: Introduce 2 levels of generic port access class Dave Jiang
2024-02-15 16:44   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 04/12] ACPI: HMAT / cxl: Add retrieval of generic port coordinates for both access classes Dave Jiang
2024-02-15 16:46   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 05/12] cxl: Split out combine_coordinates() for common shared usage Dave Jiang
2024-02-15 16:51   ` Jonathan Cameron
2024-02-16 21:28     ` Dave Jiang
2024-02-06 22:28 ` [PATCH v5 06/12] cxl: Split out host bridge access coordinates Dave Jiang
2024-02-15 16:56   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 07/12] cxl: Move QoS class to be calculated from the nearest CPU Dave Jiang
2024-02-15 16:57   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 08/12] cxl: Set cxlmd->endpoint before adding port device Dave Jiang
2024-02-15 17:01   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 09/12] cxl/region: Calculate performance data for a region Dave Jiang
2024-02-06 22:28 ` [PATCH v5 10/12] cxl/region: Add sysfs attribute for locality attributes of CXL regions Dave Jiang
2024-02-15 17:08   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 11/12] cxl/region: Add memory hotplug notifier for cxl region Dave Jiang
2024-02-15 17:16   ` Jonathan Cameron
2024-02-06 22:28 ` [PATCH v5 12/12] cxl/region: Deal with numa nodes not enumarated by SRAT Dave Jiang
2024-02-15 17:24   ` Jonathan Cameron
2024-02-20 20:47     ` Dave Jiang [this message]

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=7b4f2506-2672-4569-9552-24ae92a4a3a4@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@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