Skip to content

cxl/region: Update and test performance calculations

Alison Schofield linux-cxl 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cxl/region: Calculate performance data once all targets are attacheddrivers/cxl/core/cdat.c drivers/cxl/core/region.c drivers/cxl/cxl.h+20 -61 reply
2/4cxl/region: Show access attributes once performance data is calculateddrivers/cxl/core/region.c+16 -131 reply
3/4cxl/region: Consolidate region performance completiondrivers/cxl/core/region.c+9 -63 replies
4/4cxl/test: Give each mock memdev its own performance datatools/testing/cxl/test/cxl.c+16 -51 reply

Reviews trailers per patch

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

PatchLi Ming
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] cxl/region: Update and test performance calculations

CXL regions expose latency and bandwidth through their access0 and access1 attributes. The same performance data also contributes to NUMA node access coordinates and memory tier placement.

This series updates region performance calculation and reporting, consolidates the completion-time operations, and adds cxl_test support for validating the results.

This work was prompted by AI-assisted patch reviews that identified ways stale contributions from failed or removed targets could affect region performance data.

Patch 1 addresses stale contributions to region performance data by recalculating from the attached targets only when the region completes.

Patch 2 makes region access attributes visible as soon as performance data is available.

Patch 3 consolidates the three completion-time operations into one helper shared by user-created and autodiscovered regions.

Patch 4 assigns distinct latency and bandwidth values to cxl_test memdevs so that region performance calculations can be tested.

A new CXL unit test will be posted separately.
Testing with cxl_test:
- With all four patches, the new test and existing ndctl CXL tests pass.
- Without patch 1, rejected, cleared, and rebuilt target cases report incorrect latency or bandwidth.
- Without patch 2, the region access0 and access1 directories remain empty.

Based on v7.4-rc1.

Alison Schofield (4):
cxl/region: Calculate performance data once all targets are attached cxl/region: Show access attributes once performance data is calculated cxl/region: Consolidate region performance completion cxl/test: Give each mock memdev its own performance data

 drivers/cxl/core/cdat.c      | 19 +++++++++++++++--
 drivers/cxl/core/region.c    | 40 +++++++++++++++++++++---------------
 drivers/cxl/cxl.h            |  3 +--
 tools/testing/cxl/test/cxl.c | 21 ++++++++++++++-----
 4 files changed, 57 insertions(+), 26 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

Signature · 1 line
2.37.3