mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: Dave Jiang <dave.jiang@intel.com>, <linux-cxl@vger.kernel.org>,
	<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <gregkh@linuxfoundation.org>, <rafael@kernel.org>,
	<dakr@kernel.org>, <dave@stgolabs.net>,
	<jonathan.cameron@huawei.com>, <alison.schofield@intel.com>,
	<vishal.l.verma@intel.com>, <ira.weiny@intel.com>,
	<dan.j.williams@intel.com>, <marc.herbert@linux.intel.com>,
	<akpm@linux-foundation.org>, <david@redhat.com>
Subject: Re: [PATCH 3/4] cxl, acpi/hmat: Update CXL access coordinates directly instead of through HMAT
Date: Thu, 14 Aug 2025 15:33:06 -0700	[thread overview]
Message-ID: <689e64229859f_50ce10082@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20250814171650.3002930-4-dave.jiang@intel.com>

Dave Jiang wrote:
> The current implementation of CXL memory hotplug notifier gets called
> before the HMAT memory hotplug notifier. The CXL driver calculates the
> access coordinates (bandwidth and latency values) for the CXL end to
> end path (i.e. CPU to endpoint). When the CXL region is onlined, the CXL
> memory hotplug notifier writes the access coordinates to the HMAT target
> structs. Then the HMAT memory hotplug notifier is called and it creates
> the access coordinates for the node sysfs attributes.

Perhaps summarize quickly here the before and after of sysfs, so people
know if they are impacted by this bug, and backporters can verify they
fixed it?

> The original intent of the 'ext_updated' flag in HMAT handling code was to
> stop HMAT memory hotplug callback from clobbering the access coordinates
> after CXL has injected its calculated coordinates and replaced the generic
> target access coordinates provided by the HMAT table in the HMAT target
> structs. However the flag is hacky at best and blocks the updates from
> other CXL regions that are onlined in the same node later on. Remove the
> 'ext_updated' flag usage and just update the access coordinates for the
> nodes directly without touching HMAT target data.
> 
> The hotplug memory callback ordering is changed. Instead of changing CXL,
> move HMAT back so there's room for the levels rather than have CXL share
> the same level as SLAB_CALLBACK_PRI. The change will resulting in the CXL
> callback to be executed after the HMAT callback.
> 
> With the change, the CXL hotplug memory notifier runs after the HMAT
> callback. The HMAT callback will create the node sysfs attributes for
> access coordinates. The CXL callback will write the access coordinates to
> the now created node sysfs attributes directly and will not pollute the
> HMAT target values.
> 
> Fixes: debdce20c4f2 ("cxl/region: Deal with numa nodes not enumerated by SRAT")

Why that one and not?

067353a46d8c cxl/region: Add memory hotplug notifier for cxl region

It is the ext_updated machinery that is the main problem that messes up
sysfs, right?

...and per the backport concern this should be cc: stable as well.

Other than that you can add:

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

  reply	other threads:[~2025-08-14 22:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 17:16 [PATCH 0/4] cxl, acpi/hmat, node: Update CXL access coordinates to node directly Dave Jiang
2025-08-14 17:16 ` [PATCH 1/4] mm/memory_hotplug: Update comment for hotplug memory callback priorities Dave Jiang
2025-08-16  7:29   ` David Hildenbrand
2025-08-18 14:08     ` Dave Jiang
2025-08-19  3:14       ` Marc Herbert
2025-08-19  9:18         ` David Hildenbrand
2025-08-19 15:39           ` Dave Jiang
2025-08-19 19:08             ` David Hildenbrand
2025-08-14 17:16 ` [PATCH 2/4] drivers/base/node: Add a helper function node_update_perf_attrs() Dave Jiang
2025-08-15 13:28   ` Jonathan Cameron
2025-08-18  9:49   ` David Hildenbrand
2025-08-19 17:00     ` Dave Jiang
2025-08-14 17:16 ` [PATCH 3/4] cxl, acpi/hmat: Update CXL access coordinates directly instead of through HMAT Dave Jiang
2025-08-14 22:33   ` dan.j.williams [this message]
2025-08-14 22:59     ` Dave Jiang
2025-08-14 23:09     ` Marc Herbert
2025-08-15 13:31   ` Jonathan Cameron
2025-08-15 15:35     ` Dave Jiang
2025-08-15 15:56       ` Jonathan Cameron
2025-08-14 17:16 ` [PATCH 4/4] acpi/hmat: Remove now unused hmat_update_target_coordinates() Dave Jiang
2025-08-15 13:31   ` Jonathan Cameron

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=689e64229859f_50ce10082@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=dakr@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.herbert@linux.intel.com \
    --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®