Skip to content

DCD Prep Series

Anisa Su linux-cxl lkml nvdimm 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v16 Latest8 patches 8 repliesIn review
  2. v158 patches 14 repliesSuperseded
  3. v148 patches 30 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v13 posting 2/28 patches45 repliesSuperseded
v13 posting 1/20 of 8 patches0 repliesSuperseded
v128 patches37 repliesSuperseded
v1131 patches29 repliesSuperseded
v1031 patches63 repliesSuperseded
v1 RFC20 patches9 repliesSuperseded

Changes in v16 from the cover letter

===================
A quick respin:

- Patch 2: cxl_configure_dcd() took Identify Total Capacity as the end of static capacity, but Total Capacity is only required to be >= ram + pmem. The static end now comes from the last static partition's end dpa +1 instead of info->size. Check that DC starts from there. (Richard).

- Patch 3: dsmas_entry.qos_class initialized as CXL_QOS_CLASS_INVALID, so a DSMAS entry that is skipped for lack of DSLBIS, or whose QTG lookup fails, no longer reaches update_perf_entry() with qos_class 0, which is a valid class. (Sashiko).

Patches in v16 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)drivers/cxl/core/mbox.c drivers/cxl/cxlmem.h+59 -00 replies
2/8cxl/mem: Read dynamic capacity configuration from the devicedrivers/cxl/core/hdm.c drivers/cxl/core/mbox.c drivers/cxl/core/memdev.c +3 more+365 -23 replies
3/8cxl/cdat: Gather DSMAS data for DCD partitionsdrivers/cxl/core/cdat.c drivers/cxl/core/hdm.c drivers/cxl/core/mbox.c +3 more+124 -191 reply
4/8cxl/events: Split event msgnum configuration from irq setupdrivers/cxl/pci.c+11 -110 replies
5/8cxl/pci: Factor out interrupt policy checkdrivers/cxl/pci.c+9 -40 replies
6/8cxl/mem: Configure dynamic capacity interruptsdrivers/cxl/cxl.h drivers/cxl/cxlmem.h drivers/cxl/pci.c +1 more+156 -361 reply
7/8cxl/core: Enforce partition order/simplify partition callsdrivers/cxl/core/hdm.c drivers/cxl/core/memdev.c drivers/cxl/cxlmem.h +2 more+40 -360 replies
8/8Documentation/cxl: Document DPA partition layout and ordering rulesDocumentation/driver-api/cxl/linux/cxl-driver.rst Documentation/driver-api/cxl/maturity-map.rst+39 -01 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchWonjae LeeJunhee ParkHeesoo KimDave JiangGregory Price (Meta)Davidlohr BuesoJonathan CameronRichard ChengAlison SchofieldFan NiLi Ming
1/8T-b T-b T-b R-b R-b R-b R-b R-b R-b
2/8T-b T-b T-b R-b
3/8T-b T-b T-b R-b R-b
4/8T-b T-b T-b R-b R-b R-b R-b R-b R-b R-b
5/8T-b T-b T-b R-b R-b R-b R-b R-b R-b R-b
6/8T-b T-b T-b R-b
7/8T-b T-b T-b R-b R-b R-b
8/8T-b T-b T-b R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 11 reviewers.

Read the v16 thread

Cover letter [PATCH v16 0/8] DCD Prep Series

These are the first eight patches of the Dynamic Capacity Device (DCD) series. They set up: DCD enumeration, CDAT handling for DC partitions, the event interrupt plumbing, a preparatory refactor, and documentation of the DPA partition layout. They stand alone and keep DCD disabled. They are not dependent on the rest of the series. Patch 1 detects the 48h command set and then leaves mds->dcd_supported false. The flag is only turned on by the series that adds DCD event handling, so every DCD specific path added here is shut off at runtime:
cxl_configure_dcd() never runs, no DC partition is created, no DCD interrupt is armed, and the CXL_PARTMODE_DYNAMIC_RAM paths are unreachable. The intent is to land the enumeration and plumbing while the extent to DAX pipeline is still under review.

Based on v7.3-rc6
v15: https://lore.kernel.org/linux-cxl/[email protected]/

v15 -> v16 Changes:
===================
A quick respin:

- Patch 2: cxl_configure_dcd() took Identify Total Capacity as the end of static capacity, but Total Capacity is only required to be >= ram + pmem. The static end now comes from the last static partition's end dpa +1 instead of info->size. Check that DC starts from there. (Richard).

- Patch 3: dsmas_entry.qos_class initialized as CXL_QOS_CLASS_INVALID, so a DSMAS entry that is skipped for lack of DSLBIS, or whose QTG lookup fails, no longer reaches update_perf_entry() with qos_class 0, which is a valid class. (Sashiko).

The DSMAD handle check now checks handle > U8_MAX instead of handle & ~0xFF (Dave).

- Patch 6: when the DCD vector cannot be requested, tell the device not to use the vector: dcd_settings is cleared with
Set Event Interrupt Policy, so a device does not keep signalling a vector with no handler while the
host considers DCD off. The Set command is re-factored into a new helper cxl_event_set_int_policy() (Richard).

All other patches are unchanged.
I kept the review tags on patch 3, since the changes are minimal and dropped tags from 2 and 6.

Patch organization
==================
1-3: enumerate DCD command support, read the DC configuration, and pick
up DSMAS data for DC partitions.
4-6: split event msgnum configuration from irq setup, factor out the
interrupt policy check, then configure the DCD event interrupt.
7: preparatory refactor -- enforce partition order while collapsing
the ram/pmem specific partition helpers into one.
8: document the DPA partition layout the previous patches enforce,
and where Linux is stricter than the specification.

Testing
=======
This series leaves mds->dcd_supported false on purpose, so cxl_configure_dcd(), cxl_dev_dc_identify() and cxl_dc_check() are unreachable at runtime as posted. The tests below are done with the rest of the series on top, otherwise testing would not yield any meaningful results.

HW:
Tested add and release of one 2G tagged extent on a DCD with a sharable partition, driven from the system's BMC with FM-API Initiate Dynamic Capacity Add / Release over MCTP, to confirm the DCD interrupt configuration and the DSMAS attributes are read properly. The device is sharable, so an add without a tag and sequence number is refused.

cxl_test:
ndctl cxl test suite
16 of 17 pass, cxl-features.sh skips for lack of FWCTL

Anisa Su (1):
Documentation/cxl: Document DPA partition layout and ordering rules

Ira Weiny (7):
cxl/mbox: Flag support for Dynamic Capacity Devices (DCD) cxl/mem: Read dynamic capacity configuration from the device cxl/cdat: Gather DSMAS data for DCD partitions cxl/events: Split event msgnum configuration from irq setup cxl/pci: Factor out interrupt policy check cxl/mem: Configure dynamic capacity interrupts cxl/core: Enforce partition order/simplify partition calls

 .../driver-api/cxl/linux/cxl-driver.rst       |  35 +++
 Documentation/driver-api/cxl/maturity-map.rst |   4 +
 drivers/cxl/core/cdat.c                       |  99 +++++-
 drivers/cxl/core/hdm.c                        |  24 +-
 drivers/cxl/core/mbox.c                       | 285 ++++++++++++++++++
 drivers/cxl/core/memdev.c                     | 100 ++++--
 drivers/cxl/cxl.h                             |  14 +-
 drivers/cxl/cxlmem.h                          |  88 +++++-
 drivers/cxl/mem.c                             |   2 +-
 drivers/cxl/pci.c                             | 207 ++++++++++---
 include/cxl/cxl.h                             |  29 +-
 tools/testing/cxl/test/mem.c                  |   2 +-
 12 files changed, 792 insertions(+), 97 deletions(-)

base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a

Signature · 1 line
2.43.0