Skip to content

cxl: Region bandwidth calculation for targets with shared upstream link

Dave Jiang linux-cxl oe-kbuild-all 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 3 repliesIn review
  2. v73 patches 8 repliesSuperseded
  3. v62 patches 4 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches8 repliesSuperseded
v42 patches1 replySuperseded
v32 patches9 repliesSuperseded
v21 patch3 repliesSuperseded
v11 patch1 replySuperseded

Changes in v8 from the cover letter

- Fixed kbot warning
- Fix checking incorrect return value (Alison)
- Remove goto from cxl_region-shared_upstream_bandwidth_update() (Alison)
- Add ** for kdoc comment (Alison)
- Fixup documentation texts (Jonathan)
- Rebase against v6.11-rc

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cxl: Preserve the CDAT access_coordinate for an endpointdrivers/cxl/core/cdat.c drivers/cxl/cxlmem.h+8 -40 replies
2/3cxl: Calculate region bandwidth of targets with shared upstream linkdrivers/cxl/core/cdat.c drivers/cxl/core/core.h drivers/cxl/core/pci.c +3 more+536 -101 reply
3/3cxl: Add documentation to explain the shared link bandwidth calculationDocumentation/driver-api/cxl/access-coordinates.rst Documentation/driver-api/cxl/index.rst+93 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJonathan CameronIra WeinyAlison SchofieldDan Williams
SeriesA-b
1/3R-b R-b
2/3R-b R-b
3/3R-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 4 reviewers.

Read the v8 thread

Cover letter [PATCH v8 0/3] cxl: Region bandwidth calculation for targets with shared upstream link

v8:
- Fixed kbot warning
- Fix checking incorrect return value (Alison)
- Remove goto from cxl_region-shared_upstream_bandwidth_update() (Alison)
- Add ** for kdoc comment (Alison)
- Fixup documentation texts (Jonathan)
- Rebase against v6.11-rc

This series provides recalculation of the CXL region bandwidth when the targets have shared upstream link by walking the toplogy from bottom up and clamp the bandwdith as the code traverses up the tree. An example topology:

An example topology from Jonathan:

                 CFMWS 0
                   |
          _________|_________
         |                   |
     ACPI0017-0            ACPI0017-1
   GP0/HB0/ACPI0016-0   GP1/HB1/ACPI0016-1
     |          |        |           |
    RP0        RP1      RP2         RP3
     |          |        |           |
   SW 0       SW 1     SW 2        SW 3
   |   |      |   |    |   |       |   |
  EP0 EP1    EP2 EP3  EP4  EP5    EP6 EP7

Computation for the example topology:

Min (GP0 to CPU BW,
Min(SW 0 Upstream Link to RP0 BW,
Min(SW0SSLBIS for SW0DSP0 (EP0), EP0 DSLBIS, EP0 Upstream Link) + Min(SW0SSLBIS for SW0DSP1 (EP1), EP1 DSLBIS, EP1 Upstream link)) +
Min(SW 1 Upstream Link to RP1 BW,
Min(SW1SSLBIS for SW1DSP0 (EP2), EP2 DSLBIS, EP2 Upstream Link) + Min(SW1SSLBIS for SW1DSP1 (EP3), EP3 DSLBIS, EP3 Upstream link))) +
Min (GP1 to CPU BW,
Min(SW 2 Upstream Link to RP2 BW,
Min(SW2SSLBIS for SW2DSP0 (EP4), EP4 DSLBIS, EP4 Upstream Link) + Min(SW2SSLBIS for SW2DSP1 (EP5), EP5 DSLBIS, EP5 Upstream link)) +
Min(SW 3 Upstream Link to RP3 BW,
Min(SW3SSLBIS for SW3DSP0 (EP6), EP6 DSLBIS, EP6 Upstream Link) + Min(SW3SSLBIS for SW3DSP1 (EP7), EP7 DSLBIS, EP7 Upstream link))))

---

Dave Jiang (3):
cxl: Preserve the CDAT access_coordinate for an endpoint
cxl: Calculate region bandwidth of targets with shared upstream link
cxl: Add documentation to explain the shared link bandwidth calculation

 Documentation/driver-api/cxl/access-coordinates.rst |  90 +++++++
 Documentation/driver-api/cxl/index.rst              |   1 +
 MAINTAINERS                                         |   1 +
 drivers/cxl/core/cdat.c                             | 509 +++++++++++++++++++++++++++++++++++++++-
 drivers/cxl/core/core.h                             |   4 +-
 drivers/cxl/core/pci.c                              |  23 ++
 drivers/cxl/core/port.c                             |  20 ++
 drivers/cxl/core/region.c                           |   2 +
 drivers/cxl/cxl.h                                   |   1 +
 drivers/cxl/cxlmem.h                                |   4 +-
 10 files changed, 640 insertions(+), 15 deletions(-)