From: Anisa Su <anisa.su887@gmail.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Anisa Su <anisa.su887@gmail.com>,
linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev,
linux-kernel@vger.kernel.org, Dave Jiang <dave.jiang@intel.com>,
Jonathan Cameron <jic23@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Ira Weiny <iweiny@kernel.org>,
Vishal Verma <vishal.l.verma@intel.com>,
Fan Ni <nifan.cxl@gmail.com>, Li Ming <ming.li@zohomail.com>,
Benjamin Cheatham <benjamin.cheatham@amd.com>,
Gregory Price <gourry@gourry.net>,
Richard Cheng <icheng@nvidia.com>
Subject: Re: [PATCH v1 03/14] cxl/region: Add dynamic DAX region support
Date: Fri, 4 Dec 2026 07:09:18 +0900 [thread overview]
Message-ID: <axHojujenTt1yelZ@cxlqual> (raw)
In-Reply-To: <awXdpbmU0HSXK_uB@aschofie-mobl2.lan>
On Tue, Nov 24, 2026 at 10:55:33AM -0800, Alison Schofield wrote:
> On Thu, Nov 05, 2026 at 08:02:27AM +0900, Anisa Su wrote:
> > From: Ira Weiny <iweiny@kernel.org>
> >
> > CXL DAX regions must allow memory to be added or removed dynamically
> > to support DCD. 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. A dynamic region
> > carries the shareable and read-only properties of the partitions it
> > decodes, fixed when the region is created: every endpoint decoder
> > attached to it must point at a partition with exactly those
> > properties, and the region's 'mode' reports the matching selector.
> >
> > A dynamic region has no capacity when it is created, so the DAX device
> > that cxl_dax_region_probe() creates for every region gets size 0
> > instead of the region size: a seed that claims no capacity the device
> > has not offered yet. Its dax_region is created with IORESOURCE_DAX_DCD
> > rather than IORESOURCE_DAX_KMEM, so the DAX devices on it bind to
> > device_dax and not to kmem.
> >
> > Indicate 0 byte available capacity until such time that capacity is
> > added.
>
> Is "until such time that capacity is added" describing this series?
> dax_region_avail_size() returns 0 for every DCD dax_region.
>
> Maybe just say the available size is always 0 here, and leave the
> change to the series that makes extents usable?
>
> This paragraph also seems to repeat the one above it. Maybe drop or
> fold in.
>
Reworded to one paragraph that just mentions 0-size seed device for DC
regions:
A dynamic region has no capacity when it is created, so the DAX device
that cxl_dax_region_probe() creates for every region gets size 0
instead of the region size: a seed that claims no capacity, as the
device has not offered any yet. Its dax_region reports 0 bytes
available and is created with IORESOURCE_DAX_DCD rather than
IORESOURCE_DAX_KMEM, so the DAX devices on it bind to device_dax and
not to kmem.
> >
> > While DCD is disabled, auto region creation and the region 'target'
> > write refuse endpoint decoders on a DC partition with -ENXIO, as the
> > decoder 'mode' write already does. The sysfs entries for manual region
> > creation follow in a separate patch.
>
> No later patch in this series adds the manual creation files.
> Maybe just drop comments about what this phase now doesn't do.
>
Okie dropped all references to manual creation.
> >
> > Additionally, 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.
> >
> > Based on an original patch by Navneet Singh.
> >
> > Signed-off-by: Ira Weiny <iweiny@kernel.org>
> > Co-developed-by: Anisa Su <anisa.su@samsung.com>
> > Signed-off-by: Anisa Su <anisa.su@samsung.com>
> > Tested-by: Wonjae Lee <wj28.lee@samsung.com>
> > Tested-by: Junhee Park <jh9934.park@samsung.com>
> > Tested-by: Heesoo Kim <habil.kim@samsung.com>
> > ---
> > Documentation/ABI/testing/sysfs-bus-cxl | 5 ++-
> > drivers/cxl/core/region.c | 60 ++++++++++++++++++++++---
> > drivers/cxl/core/region_dax.c | 6 +++
> > drivers/cxl/cxl.h | 4 ++
> > drivers/dax/bus.c | 10 +++++
> > drivers/dax/bus.h | 1 +
> > drivers/dax/cxl.c | 17 ++++++-
> > 7 files changed, 93 insertions(+), 10 deletions(-)
> >
>
> snip
>
> > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> > index f4a9839c73d2..fc9139ce358f 100644
> > --- a/drivers/cxl/core/region.c
> > +++ b/drivers/cxl/core/region.c
> > @@ -495,6 +495,11 @@ static int set_interleave_ways(struct cxl_region *cxlr, int val)
> > int save, rc;
> > u8 iw;
> >
> > + if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM && val != 1) {
> > + dev_dbg(&cxlr->dev, "Interleaving and DCD not supported\n");
> > + return -EINVAL;
>
> perhaps sync this msg with devm_cxl_add_dax_region() messaging,
> which emits: "Interleaving DC not supported"
>
Synced, and from your feedback below, the interleave_ways != 1 check was moved
from devm_cxl_add_dax_region() to construct_region(). And now both read
"Interleaving DC not supported".
>
> snip
>
> > @@ -2737,6 +2765,8 @@ void kill_regions(struct cxl_root_decoder *cxlrd)
> > * @cxlrd: root decoder
> > * @id: memregion id to create, or memregion_free() on failure
> > * @mode: mode for the endpoint decoders of this region
> > + * @shareable: dynamic region: its partitions must be shareable
> > + * @read_only: dynamic region: its partitions must be read-only
> > * @type: select whether this is an expander or accelerator (type-2 or type-3)
> > *
> > * This is the second step of region initialization. Regions exist within an
> > @@ -2748,7 +2778,8 @@ void kill_regions(struct cxl_root_decoder *cxlrd)
> > static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
> > int id,
> > enum cxl_partition_mode mode,
> > - enum cxl_decoder_type type)
> > + enum cxl_decoder_type type,
> > + bool shareable, bool read_only)
>
> match kernel-doc to this order of params.
>
oops, fixed!
> snip
>
> > diff --git a/drivers/cxl/core/region_dax.c b/drivers/cxl/core/region_dax.c
> > index de04f78f6ad8..47c9c52a3902 100644
> > --- a/drivers/cxl/core/region_dax.c
> > +++ b/drivers/cxl/core/region_dax.c
> > @@ -84,6 +84,12 @@ int devm_cxl_add_dax_region(struct cxl_region *cxlr)
> > struct device *dev;
> > int rc;
> >
> > + if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM &&
> > + cxlr->params.interleave_ways != 1) {
> > + dev_dbg(&cxlr->dev, "Interleaving DC not supported\n");
> > + return -EINVAL;
> > + }
> > +
>
> Not sure probe is the right place to refuse an interleaved auto region?
> Look at if refusing for ways != 1 for a DC partition in construct_region().
> IIUC that would refuse before anything is assembled.
>
Agreed, v2 now checks interleave_ways != 1 in construct_region() instead of
here.
Thanks,
Anisa
> snip to end
>
> -- Alison
>
next prev parent reply other threads:[~2026-12-03 22:07 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 23:02 [PATCH v1 00/14] DCD CXL Series: Dynamic Capacity extent handling Anisa Su
2026-11-04 23:02 ` [PATCH v1 01/14] cxl/core: Return endpoint decoder information from region search Anisa Su
2026-11-24 18:31 ` Alison Schofield
2026-12-03 19:06 ` Anisa Su
2026-11-04 23:02 ` [PATCH v1 02/14] cxl/port: Add dynamic capacity options to endpoint decoder mode Anisa Su
2026-11-17 2:22 ` Jonathan Cameron
2026-12-03 20:44 ` Anisa Su
2026-11-24 18:36 ` Alison Schofield
2026-12-03 21:11 ` Anisa Su
2026-11-04 23:02 ` [PATCH v1 03/14] cxl/region: Add dynamic DAX region support Anisa Su
2026-11-17 2:32 ` Jonathan Cameron
2026-12-03 22:23 ` Anisa Su
2026-11-24 18:55 ` Alison Schofield
2026-12-03 22:09 ` Anisa Su [this message]
2026-11-04 23:02 ` [PATCH v1 04/14] cxl/mem: Introduce DC event handlers Anisa Su
2026-11-17 2:54 ` Jonathan Cameron
2026-11-24 19:29 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 05/14] cxl/mem: Add 20 second timeout for stalled DC event chains Anisa Su
2026-11-17 3:00 ` Jonathan Cameron
2026-11-20 20:47 ` Anisa Su
2026-11-24 19:30 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 06/14] cxl/extent: Handle DC Add Capacity events Anisa Su
2026-11-12 3:34 ` Richard Cheng
2026-11-16 21:53 ` Anisa Su
2026-11-30 19:54 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 07/14] cxl/mem: Drop misaligned DCD extent groups Anisa Su
2026-11-30 19:58 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 08/14] cxl/extent: Validate DC extent partition Anisa Su
2026-11-30 20:13 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 09/14] cxl/mem: Enforce tag-group semantics Anisa Su
2026-11-30 20:45 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 10/14] cxl/extent: Enforce cross-region tag uniqueness Anisa Su
2026-11-30 21:01 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 11/14] cxl/extent: Handle DC Release Capacity events Anisa Su
2026-11-12 7:34 ` Richard Cheng
2026-11-30 21:31 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 12/14] cxl/region: Read existing extents on region creation Anisa Su
2026-11-30 22:07 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 13/14] cxl/mem: Trace Dynamic capacity Event Record Anisa Su
2026-11-30 22:29 ` Alison Schofield
2026-11-04 23:02 ` [PATCH v1 14/14] Documentation/cxl: Document DCD extent handling Anisa Su
2026-11-30 22:59 ` Alison Schofield
2026-12-01 0:58 ` [PATCH v1 00/14] DCD CXL Series: Dynamic Capacity " Alison Schofield
2026-12-01 2:20 ` Alison Schofield
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=axHojujenTt1yelZ@cxlqual \
--to=anisa.su887@gmail.com \
--cc=alison.schofield@intel.com \
--cc=benjamin.cheatham@amd.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=gourry@gourry.net \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=nifan.cxl@gmail.com \
--cc=nvdimm@lists.linux.dev \
--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®