Re: [RFC PATCH 0/4] cxl/extent: Enable and validate multi-extent DCDs
From: Anisa Su
Date: Fri Apr 24 2026 - 02:34:53 EST
On Thu, Apr 23, 2026 at 11:51:12PM +0000, John Groves wrote:
> From: John Groves <john@xxxxxxxxxx>
>
> This series fixes correctness issues in the DCD (Dynamic Capacity
> Device) add-capacity pipeline so that multi-tag allocations, sharable
> CDAT regions, and cross-partition checks work end-to-end.
>
Thanks for the fixes, this makes way more sense. Let me see if I can squash
these nicely before LSFMM :)
One question based off the initial read:
When we do the actual dax device creation via daxctl create-device, would we
want to add an optional arg specifying uuid? I think right now, each
region_extent becomes a dax_resource of the sparse dax region and create-device
grabs any unused dax_resource if -s isn't specified. So if we want to limit to
1 tagged allocation/DAX device, we would want some way to specify that.
But let me double check tomorrow
Thanks,
Anisa
> Base
> ----
>
> The series applies on top of Anisa Su's DCD stack — specifically the
> tip of famfs-v9-dcd on the 'anisa' remote
> (git@xxxxxxxxxx:anisa-su993/anisa-linux-kernel.git). That stack is
> the one posted to linux-cxl here:
>
> https://lore.kernel.org/linux-cxl/adnWg-60uKmduTsh@gourry-fedora-PF4VCD3F/T/#t
>
> I started out commenting on prior series, then started modifying it,
> before settling on this initial approach of generalizing the
> functionality through additional patches. I'm hoping the stake holders
> will find this easy to follow - at least as easy to follow as something
> this tedious and nuanced can be.
>
> Also, as one of the authors of the DCD spec: Now I get why this was hard
> to follow and implement. The implementation is pretty complicated.
>
> Note that this RFC builds happily, but I have not tested it yet. This
> exercise has been about fleshing out the full logic.
>
> The patches
> -----------
>
> 1) cxl/extent: Promote cxlr_dax->region_extent to an xarray
>
> Infrastructure only. Replaces the single-slot region_extent
> pointer on struct cxl_dax_region with an xarray keyed by an
> allocator-assigned u32. No behavior change; prepares storage for
> multiple tagged allocations per DAX-region shim.
>
> 2) cxl/extent: Fix DCD add-capacity: per-tag assembly, ordering, and
> integrity
>
> Rewrites the add-capacity pipeline around the tag as the unit of
> allocation (not the More-chain). Drops the DPA-contiguity reject,
> assembles each tag group separately, stable-sorts by
> shared_extn_seq, and adds cross-More-chain uniqueness,
> sequence-integrity, and alignment gates. Lifts the single-slot
> "already onlined" gate now that (1) is in place.
>
> 3) cxl/extent: Support extents in sharable CDAT regions
>
> Drops the per-extent rejection of shared_extn_seq != 0 and
> replaces it with a partition-aware check driven by the DSMAS
> SHAREABLE bit already exposed through cxl_dpa_partition.
>
> 4) cxl/extent: Reject tagged extents that span DC partitions
>
> Adds a group-level check rejecting tagged allocations whose
> extents resolve to different DC partitions. A single host-visible
> allocation cannot meaningfully straddle partitions whose CDAT
> attributes disagree.
>
> Signed-off-by: John Groves <John@xxxxxxxxxx>
>
> John Groves (4):
> cxl/extent: Promote cxlr_dax->region_extent to an xarray
> cxl/extent: Fix DCD add-capacity: per-tag assembly, ordering, and
> integrity
> cxl/extent: Support extents in sharable CDAT regions
> cxl/extent: Reject tagged extents that span DC partitions
>
> drivers/cxl/core/extent.c | 93 +++---
> drivers/cxl/core/mbox.c | 628 +++++++++++++++++++++++++++++++-------
> drivers/cxl/core/region.c | 2 +
> drivers/cxl/cxl.h | 9 +-
> include/cxl/event.h | 1 -
> 5 files changed, 584 insertions(+), 149 deletions(-)
>
> --
> 2.53.0
>
>