On Sat, May 23, 2026 at 02:43:01AM -0700, Anisa Su wrote:
> From: Ira Weiny <[email protected]>
>
> DC DAX regions must allow memory to be added or removed dynamically.
> In addition to the quantity of memory available the,
> location of the memory within a DC partition is dynamic, based on the
> extents offered by a device. CXL DAX regions must accommodate the
> dynamic movement of this memory in the management of DAX regions and devices.
>
> Introduce the concept of a dynamic DAX region. Introduce
> create_dynamic_ram_a_region() sysfs entry to create such regions.
> Special case DC-capable regions to create a 0 sized seed DAX device
> to maintain compatibility which requires a default DAX device to hold a
> region reference.
>
> Indicate 0 byte available capacity until such time that capacity is
> added.
>
> Dynamic regions complicate the range mapping of dax devices. There is no
> known use case for range mapping on dynamic regions. Avoid the
> complication by preventing range mapping of dax devices on dynamic
> regions.
>
> Interleaving is deferred for now. Add checks.
>
> Based on an original patch by Navneet Singh.
>
> Signed-off-by: Ira Weiny <[email protected]>
>
Hi Anisa,
This change is needed and I think it belongs in this patch:
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 9fbcb2035600..e6d9a6238677 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -647,6 +647,8 @@ static ssize_t mode_show(struct device *dev, struct
device_attribute *attr,
desc = "ram";
else if (cxlr->mode == CXL_PARTMODE_PMEM)
desc = "pmem";
+ else if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM_A)
+ desc = "dynamic_ram_a";
else
desc = "";
IIUC That empty string default should be for an unset mode only.
And, this makes the new type appear in cxl list -R
-- Alison