Separate GGTT pools for submissions and VFs provisioning
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest5 patches 0 repliesNew
- v85 patches 1 replySuperseded
- v7 posting 2/25 patches 9 repliesSuperseded
Earlier versions · 12
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 posting 2/2 | 4 patches | 4 replies | Superseded | |
| v7 posting 1/2 | 4 patches | 1 reply | Superseded | |
| v6 posting 1/2 | 4 patches | 3 replies | Superseded | |
| v5 posting 2/2 | 4 patches | 4 replies | Superseded | |
| v5 posting 1/2 | 4 patches | 0 replies | Superseded | |
| v4 posting 2/2 | 3 patches | 4 replies | Superseded | |
| v4 posting 1/2 | 4 patches | 2 replies | Superseded | |
| v3 posting 2/2 | 4 patches | 0 replies | Superseded | |
| v3 posting 1/2 | 3 patches | 0 replies | Superseded | |
| v2 posting 2/2 | 4 patches | 0 replies | Superseded | |
| v2 posting 1/2 | 3 patches | 0 replies | Superseded | |
| v1 | 3 patches | 0 replies | Superseded |
Changes in v9 from the cover letter
- Keep the best-fit placement for usable allocations when there is no shareable pool, instead of switching native and VF to top-down, so that stolen BOs stay within the CPU mappable aperture on older integrated platforms (Sashiko).
- Provision VF GGTT from the shareable pool on the PF, so that VF regions are allocated top-down again instead of bottom-up together with the PF's own allocations (Sashiko).
- Expect the native usable pool allocation at the bottom of the GGTT in the KUnit tests, to match the best-fit placement.
- Rename ggtt_test_ggtt() to ggtt_test_get() in the KUnit tests (Lukasz).
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | drm/xe/ggtt: Assert lower bound of GGTT PTE addressdrivers/ | +2 | 0 replies | |
| 2/5 | drm/xe/ggtt: Introduce full GGTT range sizedrivers/ | +7 | 0 replies | |
| 3/5 | drm/xe/ggtt: Split GGTT into usable and shareable poolsdrivers/ drivers/ drivers/ | +144 | 0 replies | |
| 4/5 | drm/xe/ggtt: Initialize GGTT pools by SR-IOV modedrivers/ | +96 | 0 replies | |
| 5/5 | drm/xe/ggtt: Add KUnit tests for usable and shareable poolsdrivers/ drivers/ | +338 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Tomasz Lis | Lukasz Laguna |
|---|---|---|
| 1/5 | R-b | |
| 2/5 | R-b | |
| 3/5 | R-b | |
| 4/5 | R-b | |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v9 0/5] Separate GGTT pools for submissions and VFs provisioning
From: Piotr Piórkowski <[email protected]>
GGTT space is used both for driver-owned allocations and for provisioning GGTT regions to VFs. These allocations currently share a single pool, which does not allow their usable ranges or allocation policies to be managed independently.
Introduce separate logical usable and shareable GGTT pools. The pools may overlap, while each allocation remains constrained to its corresponding range. When a shareable pool is present, usable allocations proceed from the bottom and shareable allocations from the top.
v1 -> v2:
- Rename ggtt->usable_size back to ggtt->size.
- Remove the ggtt_insert_node_in_range() helper.
v2 -> v3:
- Init ggtt.lock with mutex_init() in each test.
- Introduce the hw_size struct field instead of the ggtt_accessible_size function.
v3 -> v4:
- Set the shareable pool size only for SR-IOV PF,
- Return -ENOSPC instead of asserting when a large BO no longer fits after end is clamped to ggtt->size.
v4 -> v5:
- Add a preparatory patch introducing ggtt->full_size to separate the full assigned GGTT range from the regular usable range.
- Rework the GGTT split patch to use full_size/shareable_size terminology, compute the shareable start on demand, and keep regular allocations within the usable pool.
- Move the range initializer rename and full_size parameter into the GGTT split patch.
- Rename the native range discovery helper to ggtt_probe().
- Treat out-of-range VF GGTT configuration as invalid instead of clamping it.
- Move GGTT range logging into the common initialization path.
- Add GGTT KUnit coverage for usable/shareable pool initialization, allocation direction, overlapping pools, unavailable shareable pool, and oversized requests.
- Rename the GGTT KUnit test file to use the _kunit.c suffix, add shared setup/cleanup helpers, and split PCI IOV tests into a separate suite.
- Drop redundant non-PCI_IOV stubs and misleading provisioning debug output.
v5 -> v6:
- Release allocated GGTT nodes in the KUnit tests through deferred actions, so that an aborted test does not leak them into drm_mm_takedown() (Sashiko).
- Rebase on current drm-tip
v6 -> v7:
- Add a preparatory patch asserting the lower bound of GGTT PTE addresses (Tomasz).
- Rename ggtt_shareable_start() to ggtt_shareable_offset(), as it returns an offset within the GGTT range, not a GGTT address (Tomasz).
- Explain why the usable and shareable pool sizes are checked separately (Tomasz).
- Drop the guard() conversion in __xe_ggtt_insert_bo_at(), so the GGTT lock is again released before the invalidation (Tomasz).
- Fix the !CONFIG_PCI_IOV KUnit build (Sashiko).
v7 -> v8:
- Use the root tile's GGTT allocated by the fake device in the KUnit tests instead of a locally allocated one (Lukasz).
- Reuse ggtt_node_remove(), ggtt_init_native() and ggtt_init_shared() in the KUnit tests instead of open-coding them.
v8 -> v9:
- Keep the best-fit placement for usable allocations when there is no shareable pool, instead of switching native and VF to top-down, so that stolen BOs stay within the CPU mappable aperture on older integrated platforms (Sashiko).
- Provision VF GGTT from the shareable pool on the PF, so that VF regions are allocated top-down again instead of bottom-up together with the PF's own allocations (Sashiko).
- Expect the native usable pool allocation at the bottom of the GGTT in the KUnit tests, to match the best-fit placement.
- Rename ggtt_test_ggtt() to ggtt_test_get() in the KUnit tests (Lukasz).
Piotr Piórkowski (5):
drm/xe/ggtt: Assert lower bound of GGTT PTE address drm/xe/ggtt: Introduce full GGTT range size drm/xe/ggtt: Split GGTT into usable and shareable pools drm/xe/ggtt: Initialize GGTT pools by SR-IOV mode drm/xe/ggtt: Add KUnit tests for usable and shareable pools
drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c | 334 +++++++++++++++++++++ drivers/gpu/drm/xe/xe_ggtt.c | 297 ++++++++++++++---- drivers/gpu/drm/xe/xe_ggtt.h | 4 + drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 2 +- 4 files changed, 583 insertions(+), 54 deletions(-) create mode 100644 drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c
Signature · 1 line
2.34.1