Re: [PATCH v6 0/7] ndctl: Dynamic Capacity additions for cxl-cli

From: Anisa Su

Date: Mon Jun 08 2026 - 04:28:23 EST


On Thu, Jun 04, 2026 at 10:43:10PM -0700, Alison Schofield wrote:
> On Sat, May 23, 2026 at 02:50:35AM -0700, Anisa Su wrote:
> > CXL Dynamic Capacity Device (DCD) support has continued to evolve in the
> > upstream kernel since Ira's v5 posting [1]. The kernel side has settled
> > on a uuid-driven claim model for sparse DAX devices: dax_resources carry
> > the tag delivered with each extent, and userspace selects which ones to
> > claim by writing a UUID to the dax device's sysfs 'uuid' attribute (or
> > "0" to claim a single untagged resource). Size on a sparse region is
> > determined by the claim, not requested up-front.
> >
> > This series brings cxl-cli and daxctl in line with that model and
> > extends cxl_test to exercise the new paths end-to-end.
>
> Hi Anisa,
>
> I just now picked this up with the kernel side and took it for a quick
> test drive. Based on what's been touched, first meaningful finding is
> all the DAX unit tests pass, and then for CXL unit tests, all but these
> 2 pass: cxl-security.sh and cxl-dcd.sh
>
> Please let me know if there are known problems with either of those
> before I explore further.

Oh hmm... I would expect cxl-dcd.sh to pass. Let me know what error you
saw? But it's totally possible that I mucked something up with some last
minute change. Let me try it again on my side...

For cxl-security.sh, sorry I was bad and didn't run all of the other CXL
unit tests. Pin of shame for me ;(◞‸ ◟)

Let me figure out how to get the NDCTL test runner working and it should
not be an issue moving forward
>
> Question below about dependency....
>
> >
> > The corresponding kernel patchset is here:
> > https://lore.kernel.org/linux-cxl/cover.1779528761.git.anisa.su@xxxxxxxxxxx/T/#t
> >
> > Picked up unchanged from v5 (Ira):
> >
> > libcxl: Add Dynamic RAM A partition mode support
> > cxl/region: Add cxl-cli support for dynamic RAM A
> > libcxl: Add extent functionality to DC regions
> > cxl/region: Add extent output to region query
> >
> > New in v6:
> >
> > daxctl: Add --uuid option to create-device for DC DAX regions
> > - Plumbs writes to the new dax 'uuid' sysfs attribute through a new
> > daxctl_dev_set_uuid() helper (LIBDAXCTL_11).
> > - --uuid is mutually exclusive with --size; pass "0" to claim a
> > single untagged dax_resource. An unmatched UUID surfaces ENOENT
> > from the kernel and leaves the device at size 0.
> > - Documents the option in the man page.
> >
> > cxl/test: Add Dynamic Capacity tests (rewritten on top of Ira's
> > original patch to track the post-redesign kernel)
> > - Routes untagged claims via --uuid "0" so daxctl exercises the
> > kernel uuid_store path; tagged claims use real UUID strings.
> > - Asserts that for DC regions, size-grow returns -EOPNOTSUPP (real grow is
> > --uuid only) and that tag reuse across More-chains is rejected
> > by the cross-More uniqueness gate.
> > - Adds coverage for the new validators: test_uuid_no_match,
> > test_uuid_no_match_seed_intact, test_uuid_show,
> > test_cross_more_uniqueness, test_alignment_rejection.
> > - Sharable-partition coverage (test_shared_extent_inject,
> > test_seq_integrity_gap) is routed at runtime to a dedicated mock
> > memdev that tools/testing/cxl stamps with serial 0xDCDC, so a
> > single cxl_test module load exercises both regimes.
> > - Localizes positional-arg assignments in every helper so functions
> > no longer clobber caller globals (the previous behavior leaked
> > the sharable memdev into later tests).
> > - test_reject_overlapping arithmetic now lands an actual overlap
> > inside the DC region (the prior math landed past the end).
> >
> > Depends on the kernel DCD/sparse-DAX series; without it the new tests
> > will skip and 'cxl list -r N -Nu' will simply report no extents.
>
> What is this dependency- DCD/sparse-DAX series ?
>
Sorry, I just meant the kernel support for DCD. Poorly worded here. 'sparse'
DAX is just the terminology for DAX regions backed by DCD.
Well, in the kernel patchset, I renamed it to
"DC DAX" to make the association clearer, but then forgot to reflect it
on this side (𖦹ᯅ_𖦹)

Thanks for testing!
Anisa
> >
> > The branch is also available at:
> >
> > https://github.com/anisa-su993/anisa-ndctl/tree/dcd-2026-05-21
> >
> > Based on pmem/pending commit:
> >
> > bbd403a test/cxl-sanitize: avoid sanitize submit/wait race
> >
> > [1] https://lore.kernel.org/nvdimm/20250413-dcd-region2-v5-0-fbd753a2e0e8@xxxxxxxxx/
> >
> > ---
> > Changes in v6:
> > - anisa: New patch — daxctl --uuid option + daxctl_dev_set_uuid() helper
> > - anisa: Rewrite cxl/test DCD tests against the post-redesign kernel
> > (uuid sysfs claim, tag-group atomic release, cross-More
> > uniqueness, alignment rejection, DC size-grow refusal)
> > - anisa: Rebase onto bbd403a (pmem/pending)
> > - Link to v5: https://lore.kernel.org/nvdimm/20250413-dcd-region2-v5-0-fbd753a2e0e8@xxxxxxxxx/
> >
> > Changes in v5:
> > - iweiny: Adjust all code to view only the dynamic RAM A partition
> > - Alison: s/tag/uuid/ in region query extent output
> > - Link to v4: https://patch.msgid.link/20241214-dcd-region2-v4-0-36550a97f8e2@xxxxxxxxx
> >
> > Anisa Su (1):
> > daxctl: Add --uuid option to create-device for DC regions
> >
> > Ira Weiny (6):
> > ndctl: Dynamic Capacity additions for cxl-cli
> > libcxl: Add Dynamic RAM A partition mode support
> > cxl/region: Add cxl-cli support for dynamic RAM A
> > libcxl: Add extent functionality to DC regions
> > cxl/region: Add extent output to region query
> > cxl/test: Add Dynamic Capacity tests
> >
> > Documentation/cxl/cxl-list.txt | 29 +
> > Documentation/cxl/lib/libcxl.txt | 33 +-
> > Documentation/daxctl/daxctl-create-device.txt | 12 +
> > cxl/filter.h | 3 +
> > cxl/json.c | 67 +
> > cxl/json.h | 3 +
> > cxl/lib/libcxl.c | 181 +++
> > cxl/lib/libcxl.sym | 9 +
> > cxl/lib/private.h | 14 +
> > cxl/libcxl.h | 21 +-
> > cxl/list.c | 3 +
> > cxl/memdev.c | 4 +-
> > cxl/region.c | 27 +-
> > daxctl/device.c | 72 +-
> > daxctl/lib/libdaxctl.c | 44 +
> > daxctl/lib/libdaxctl.sym | 5 +
> > daxctl/libdaxctl.h | 1 +
> > test/cxl-dcd.sh | 1267 +++++++++++++++++
> > test/meson.build | 2 +
> > util/json.h | 1 +
> > 20 files changed, 1771 insertions(+), 27 deletions(-)
> > create mode 100644 test/cxl-dcd.sh
> >
> >
> > base-commit: bbd403a03fa2a1551c1a10bbf78f32027c718758
> > --
> > 2.43.0
> >