mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/7] ndctl: Dynamic Capacity additions for cxl-cli
@ 2026-05-23  9:50 Anisa Su
  2026-05-23  9:50 ` [PATCH v6 1/7] " Anisa Su
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Anisa Su @ 2026-05-23  9:50 UTC (permalink / raw)
  To: linux-cxl, linux-kernel
  Cc: nvdimm, Dan Williams, Jonathan Cameron, Davidlohr Bueso,
	Dave Jiang, Ira Weiny, Alison Schofield, John Groves,
	Gregory Price, Anisa Su

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.

The corresponding kernel patchset is here:
https://lore.kernel.org/linux-cxl/cover.1779528761.git.anisa.su@samsung.com/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.

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@intel.com/

---
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@intel.com/

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@intel.com

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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2026-06-25  9:34 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-23  9:50 [PATCH v6 0/7] ndctl: Dynamic Capacity additions for cxl-cli Anisa Su
2026-05-23  9:50 ` [PATCH v6 1/7] " Anisa Su
2026-06-08 23:18   ` Dave Jiang
2026-05-23  9:50 ` [PATCH v6 2/7] libcxl: Add Dynamic RAM A partition mode support Anisa Su
2026-06-08 23:19   ` Dave Jiang
2026-06-10  3:51     ` Richard Cheng
2026-06-10 16:55       ` Dave Jiang
2026-06-25  9:08         ` Anisa Su
2026-06-25  9:07     ` Anisa Su
2026-05-23  9:50 ` [PATCH v6 3/7] cxl/region: Add cxl-cli support for dynamic RAM A Anisa Su
2026-06-08 23:58   ` Dave Jiang
2026-05-23  9:50 ` [PATCH v6 4/7] libcxl: Add extent functionality to DC regions Anisa Su
2026-06-09  0:05   ` Dave Jiang
2026-06-25  9:18     ` Anisa Su
2026-05-23  9:50 ` [PATCH v6 5/7] cxl/region: Add extent output to region query Anisa Su
2026-06-09  0:08   ` Dave Jiang
2026-06-10  3:55     ` Richard Cheng
2026-06-16 10:47       ` Anisa Su
2026-06-16 10:45     ` Anisa Su
2026-05-23  9:50 ` [PATCH v6 6/7] daxctl: Add --uuid option to create-device for sparse regions Anisa Su
2026-06-09  0:12   ` Dave Jiang
2026-06-25  9:30     ` Anisa Su
2026-05-23  9:50 ` [PATCH v6 7/7] cxl/test: Add Dynamic Capacity tests Anisa Su
2026-06-09  0:24   ` Dave Jiang
2026-06-25  9:34     ` Anisa Su
2026-06-05  5:43 ` [PATCH v6 0/7] ndctl: Dynamic Capacity additions for cxl-cli Alison Schofield
2026-06-08  8:11   ` Anisa Su
2026-06-17  7:10   ` Alison Schofield
2026-06-18  5:52     ` Anisa Su
2026-06-19  0:38       ` Alison Schofield
2026-06-24  4:51         ` Anisa Su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome