From: Alison Schofield <alison.schofield@intel.com>
To: Anisa Su <anisa.su887@gmail.com>
Cc: <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>,
Anisa Su <anisa.su@samsung.com>
Subject: Re: [PATCH v1 14/14] Documentation/cxl: Document DCD extent handling
Date: Mon, 30 Nov 2026 14:59:14 -0800 [thread overview]
Message-ID: <aw3_wmEIKteDPJ5J@aschofie-mobl2.lan> (raw)
In-Reply-To: <20261104230445.66625-15-anisa.su@samsung.com>
On Thu, Nov 05, 2026 at 08:02:38AM +0900, Anisa Su wrote:
> Add a "Dynamic Capacity Extents" section to cxl-driver.rst, describing
> when CXL core accepts an offered extent and when a release request
> is acknowledged.
>
> Update maturity-map.rst to reflect initial support for "Extent add /
> release event handling". Overall DCD Support stays at [0] until the
> DAX layer plumbing lands and extents become usable.
>
> Signed-off-by: Anisa Su <anisa.su@samsung.com>
> ---
> .../driver-api/cxl/linux/cxl-driver.rst | 181 ++++++++++++++++++
> Documentation/driver-api/cxl/maturity-map.rst | 2 +-
> 2 files changed, 182 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/driver-api/cxl/linux/cxl-driver.rst b/Documentation/driver-api/cxl/linux/cxl-driver.rst
> index 212df4fb8d63..28f6c0530c8a 100644
> --- a/Documentation/driver-api/cxl/linux/cxl-driver.rst
> +++ b/Documentation/driver-api/cxl/linux/cxl-driver.rst
> @@ -654,6 +654,187 @@ from HPA to DPA. This is why they must be aware of the entire interleave set.
> Linux does not support unbalanced interleave configurations. As a result, all
> endpoints in an interleave set must have the same ways and granularity.
>
> +Dynamic Capacity Extents
> +========================
> +
> +A `Dynamic Capacity Device (DCD)` advertises capacity in `DC Regions`
> +and surfaces individual chunks of that capacity to the host as
> +`extents` (CXL r4.0 Section 9.13.3 "Dynamic Capacity Device (DCD)").
> +Linux calls a DC Region a `DC partition` (see "DPA Partitions" above)
> +so that "region" keeps its software meaning: a :code:`cxl_region` is
> +the host-side object that maps DPA into a host physical address range,
> +whereas a DC Region is a device-defined slice of DPA space.
> +
> +Accepting Extents
> +-----------------
> +Extents are made available to the host through DC Add events: the
> +device sends one or more Dynamic Capacity Event Records (CXL r4.0
> +Section 8.2.10.2.1.6, Table 8-229) to the host. Each record carries
> +one extent, which the host may accept or reject. A device offering
> +several extents sends one record per extent, chained with `More`: each
> +record has the `More` flag set to announce another incoming record,
> +until the last record, which carries `More=0` to mark the end of the
> +chain.
> +
> +For each record received, the host stages the offered extent on a
> +pending list. When the chain closes the host knows that every extent
> +of this add event has arrived, and the whole pending list is validated
> +before anything is accepted. A chain whose closing record does not
The code validates and onlines one tag group at a time. Only the Add
response waits for the whole list. Should the doc say that?
> +arrive within 20 seconds is refused as a whole: the watchdog answers
> +with an empty Add Dynamic Capacity Response so the device can reclaim
> +the offer, and the staged extents are discarded.
> +
> +From the pending list, extents that share a (non-null) tag are
> +extracted into a tag group so that each group can be validated as a
> +unit; a group that is accepted becomes a :code:`struct
> +cxl_dc_tag_group`. A tag group is one logical allocation. An untagged
> +extent is an allocation of its own and becomes a single-member group.
> +
> +Group-level validation (:code:`cxl_validate_group()`,
> +:code:`drivers/cxl/core/mbox.c`) drops the whole group if any check
> +fails:
> +
> +* `Host-wide tag uniqueness`: a non-null tag must not already
> + correspond to a live :code:`cxl_dc_tag_group` anywhere on this host.
> + The orchestrator / Fabric Manager owns tag assignment (CXL r4.0
> + Section 9.13.3.1 "DCD Management by FM" and Section 7.6.7.6 "DCD
> + Management Command Set for LD-FAM"); the list in
> + :code:`drivers/cxl/core/extent.c` (:code:`cxl_tag_register()` /
> + :code:`cxl_tag_already_committed()`) catches firmware bugs and
The section names a lot of static helpers and file paths that can go
stale. The rules themselves stay valid. Maybe describe the rules and
keep only the user-visible names, such as tag_groupX.Y, extentX.Y and
untagged?
snip
> +* The extent's DPA range must lie within a DC partition of the memdev
> + (:code:`cxl_extent_dc_partition()`). On a sharable partition the
> + extent must carry a tag; on a non-sharable one its shared extent
> + sequence must be 0.
> +* The extent's DPA range must resolve to a CXL region via
> + :code:`cxl_dpa_to_region()`. An extent with no owning region is
> + dropped, as is one whose :code:`dax_region` has not finished its
> + probe-time scan or has no driver bound (see Recovery below).
There isn't a 'Recovery' section.
snip
> +Releasing Extents
> +-----------------
> +
> +A release may be initiated by the device (a Release Capacity event) or
> +by the host, for example when tearing down a region. A host may also
> +issue a Release Dynamic Capacity Response not associated with any
> +event, an "unsolicited release", at any time (CXL r4.0 Section 9.13.3).
The spec calls opcode 4803h "Release Dynamic Capacity" (8.2.10.9.9.4).
This section says "Release Dynamic Capacity Response" four times.
Suggest using the spec name.
> +The host-initiated path runs :code:`dc_tag_group_teardown()` for each
> +tag group of the region: it invalidates the region's cached lines,
> +returns the group with its own Release Dynamic Capacity Response and
> +unregisters its extents. The device-initiated path goes through the
> +release chain in :code:`drivers/cxl/core/mbox.c`.
This says teardown always invalidates, but teardown releases even when
the invalidation fails (raised on patch 6), while the device-initiated
path below keeps the group when it fails (patch 11). Whichever policy
is chosen, update the doc to state it for both paths.
snip
> +
> +* The extent is resolved by :code:`cxl_resolve_extent()` to its CXL
> + region and :code:`cxl_dc_tag_group`.
> +* An extent the host does not own is acknowledged so the device knows
> + the host is not using it: its DPA range resolves to no region, to a
> + region whose :code:`cxlr_dax` is not set up, or to a range that
> + overlaps nothing the host owns (for example, an extent left over
> + from a host crash that has not yet been re-claimed, or a duplicate
s/re-claimed/reclaimed
prev parent reply other threads:[~2026-11-30 22:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 23:02 [PATCH v1 00/14] DCD CXL Series: Dynamic Capacity " 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-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-11-24 18:36 ` Alison Schofield
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-11-24 18:55 ` Alison Schofield
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 [this message]
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=aw3_wmEIKteDPJ5J@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=anisa.su887@gmail.com \
--cc=anisa.su@samsung.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®