Linux CXL
 help / color / mirror / Atom feed
* [PATCH v3 0/6] cxl: DPA partition metadata is a mess...
@ 2025-02-04  4:24 Dan Williams
  2025-02-04  4:24 ` [PATCH v3 1/6] cxl: Remove the CXL_DECODER_MIXED mistake Dan Williams
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Dan Williams @ 2025-02-04  4:24 UTC (permalink / raw)
  To: linux-cxl
  Cc: Ira Weiny, Jonathan Cameron, Dave Jiang, Alejandro Lucero,
	dave.jiang, Jonathan.Cameron

Changes since v2 [0]:
- Fix "no partition found" debug messages in update_perf_entry() and
  cxl_memdev_set_qos_class() (Jonathan)
- Avoid touching dpa_perf_contains() twice in the series to add / remove
  NULL check (Alejandro)
- Add a cxl_mode_name() helper (Jonathan)
- Use @part as the iterator in cxl_dpa_set_part() to simplify mode
  lookups (Jonathan)
- Require ordered + contiguous partitions (Ira and Alejandro)
- Fix partition detection for BIOS established reservations, and kill
  CXL_PARTMODE_NONE (Jonathan)
- Simplify release_skip() reuse its internals for request_skip()
  (Jonathan)
- Add patch6 to finish cleanup of explicit partition lookups

[0]: http://lore.kernel.org/173753635014.3849855.17902348420186052714.stgit@dwillia2-xfh.jf.intel.com

---

As noted in patch3, the pending efforts to add CXL Accelerator (type-2)
device [1], and Dynamic Capacity (DCD) support [2], tripped on the
no-longer-fit-for-purpose design in the CXL subsystem for tracking
device-physical-address (DPA) metadata.

In fact there was no design at all, just a couple of open-coded 'struct
resource' instances for 'ram' and 'pmem' and a pile of explicit code
referencing those resources directly.

See patch3 for more details on the specific problems that caused, and
patch4 for the eyesore reduction of making the DPA allocation algorithm
partition number agnostic.

The motivation with this effort is to make it easier to land the Type-2
and DCD series.

[1]: http://lore.kernel.org/20241230214445.27602-1-alejandro.lucero-palau@amd.com
[2]: http://lore.kernel.org/20241210-dcd-type2-upstream-v8-0-812852504400@intel.com

---

Dan Williams (6):
      cxl: Remove the CXL_DECODER_MIXED mistake
      cxl: Introduce to_{ram,pmem}_{res,perf}() helpers
      cxl: Introduce 'struct cxl_dpa_partition' and 'struct cxl_range_info'
      cxl: Make cxl_dpa_alloc() DPA partition number agnostic
      cxl: Kill enum cxl_decoder_mode
      cxl: Cleanup partition size and perf helpers


 drivers/cxl/core/cdat.c      |  101 +++++++------
 drivers/cxl/core/core.h      |    4 -
 drivers/cxl/core/hdm.c       |  319 ++++++++++++++++++++++++++++++++----------
 drivers/cxl/core/mbox.c      |   66 +++------
 drivers/cxl/core/memdev.c    |   66 +++++----
 drivers/cxl/core/port.c      |   21 ++-
 drivers/cxl/core/region.c    |  137 +++++++++---------
 drivers/cxl/cxl.h            |   39 +----
 drivers/cxl/cxlmem.h         |   52 ++++++-
 drivers/cxl/mem.c            |    2 
 drivers/cxl/pci.c            |    7 +
 tools/testing/cxl/test/cxl.c |   22 +--
 tools/testing/cxl/test/mem.c |    7 +
 13 files changed, 519 insertions(+), 324 deletions(-)

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-02-04 21:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04  4:24 [PATCH v3 0/6] cxl: DPA partition metadata is a mess Dan Williams
2025-02-04  4:24 ` [PATCH v3 1/6] cxl: Remove the CXL_DECODER_MIXED mistake Dan Williams
2025-02-04 17:42   ` Fan Ni
2025-02-04  4:24 ` [PATCH v3 2/6] cxl: Introduce to_{ram,pmem}_{res,perf}() helpers Dan Williams
2025-02-04 11:30   ` Jonathan Cameron
2025-02-04 17:50   ` Fan Ni
2025-02-04  4:24 ` [PATCH v3 3/6] cxl: Introduce 'struct cxl_dpa_partition' and 'struct cxl_range_info' Dan Williams
2025-02-04 11:50   ` Jonathan Cameron
2025-02-04 18:50     ` Dan Williams
2025-02-04  4:24 ` [PATCH v3 4/6] cxl: Make cxl_dpa_alloc() DPA partition number agnostic Dan Williams
2025-02-04 12:13   ` Jonathan Cameron
2025-02-04  4:24 ` [PATCH v3 5/6] cxl: Kill enum cxl_decoder_mode Dan Williams
2025-02-04 12:23   ` Jonathan Cameron
2025-02-04 18:57     ` Dan Williams
2025-02-04  4:24 ` [PATCH v3 6/6] cxl: Cleanup partition size and perf helpers Dan Williams
2025-02-04 12:32   ` Jonathan Cameron
2025-02-04 20:52   ` Ira Weiny
2025-02-04 10:42 ` [PATCH v3 0/6] cxl: DPA partition metadata is a mess Alejandro Lucero Palau
2025-02-04 21:33 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox