Page Reclamation Support for Xe3p Platforms
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest10 patches 0 repliesNew
- v510 patches 7 repliesSuperseded
- v410 patches 2 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 10 patches | 1 reply | Superseded | |
| v2 | 11 patches | 22 replies | Superseded | |
| v1 | 11 patches | 36 replies | Superseded |
Changes in v6 from the cover letter
- Rebase and checkpatch fixes.
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | drm/xe: Do not forward invalid TLB invalidation seqnos to upper layersdrivers/ drivers/ | +21 | 0 replies | |
| 2/10 | drm/xe/xe_tlb_inval: Modify fence interface to support PPC flushdrivers/ | +6 | 0 replies | |
| 3/10 | drm/xe: Add page reclamation info to device infodrivers/ drivers/ drivers/ | +4 | 0 replies | |
| 4/10 | drm/xe/guc: Add page reclamation interface to GuCdrivers/ drivers/ drivers/ +1 more | +24 | 0 replies | |
| 5/10 | drm/xe: Create page reclaim list on unbinddrivers/ drivers/ drivers/ +3 more | +290 | 0 replies | |
| 6/10 | drm/xe: Suballocate BO for page reclaimdrivers/ drivers/ drivers/ +2 more | +66 | 0 replies | |
| 7/10 | drm/xe: Prep page reclaim in tlb inval jobdrivers/ drivers/ drivers/ | +40 | 0 replies | |
| 8/10 | drm/xe: Append page reclamation action to tlb invaldrivers/ drivers/ drivers/ +3 more | +36 | 0 replies | |
| 9/10 | drm/xe: Optimize flushing of L2$ by skipping unnecessary page reclaimdrivers/ drivers/ drivers/ +2 more | +55 | 0 replies | |
| 10/10 | drm/xe: Add debugfs support for page reclamationdrivers/ | +41 | 0 replies |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Matthew Brost | Tejas Upadhyay | Shuicheng Lin |
|---|---|---|---|
| 1/10 | R-b | ||
| 2/10 | R-b | R-b | |
| 3/10 | R-b | R-b | |
| 4/10 | R-b | R-b | |
| 5/10 | R-b | ||
| 6/10 | R-b | ||
| 7/10 | R-b | ||
| 8/10 | R-b | ||
| 9/10 | R-b | ||
| 10/10 | 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 3 reviewers.
Cover letter [PATCH v6 00/10] Page Reclamation Support for Xe3p Platforms
This series introduces a hardware-assisted page reclamation support on Xe3p
platforms, integrating with the KMD's existing TLB invalidation workflow and adding the ability to perform selective Private Physical Cache (PPC) flushing rather than always forcing the default full PPC flush.
Currently as of Xe2, Xe TLB invalidations trigger a full Private Physical Cache flush to guarantee non-coherent memory correctness. New HW (Xe3p and beyond) supports a page reclamation feature, which we selectively enable on platforms with a flag in device info.
The driver can provide a “Page Reclaim List” (PRL), tracking the physical pages used that correspond to an unmap/unbind operation and let hardware perform selective cache line eviction. If reclamation succeeds, we skip the full PPC flush entirely otherwise we fall back to our current process of full PPC flush with the TLB invalidation.
Thanks,
Brian
v2:
- General refactor to remove additional variables from tlb fences (flush_cache and PRL ptr). (Matthew B)
- Removed lock from xe_tlb_inval_reset_timeout and moved into xe_tlb_inval_done_handler. (Matthew B)
- Removed page reclaim variables out of tlb fences (Matthew B)
- Add FW check for page reclaim support. (Shuicheng, Matthew B)
- Moved PRL max entries overflow handling out from generate_reclaim_entry to caller. (Shuicheng)
- Fix one off error with NULL terminated PRL.
- Add xe_page_reclaim_list_init for clarity. (Matthew B)
- Invalidate PRL on early abort page walks.
- Allocate PRL bo size to num_entries. (Matthew B)
- Move PRL bo allocation to tlb_inval run_job. (Matthew B)
- Modify debugfs to expose file only if page reclaim supported by default instead of previous behavior to return an ENODEV and thus no need to move xe_match_desc from configfs (Michal)
- Compacted warning checking, update commit message, spelling, moved variables, etc. (Shuicheng, Matthew B, Michal)
- Remove unused function. (Shuicheng)
- Fix various missing kernel doc input.
v3:
- Removed MEDIA_IS_ON due to racy condition. (Matthew A)
- Move l3 policy access to xe_pat. (Matthew A)
- Add vm_dbg prints for PRL generation and invalidation. (Matthew B)
- Add comments for PRL tile handling and flush behavior with medai. (Matthew B)
- Modify reclaim_entry to QW and adjust bitfields accordingly. (Matthew B)
- Add missing shift of PTE for page address in reclaim entry. (Matthew B)
- Fix NULL pointer dereference check.
- s/ifence/fence for kernel doc.
- Squashed dependent patch.
- Update erroneous comments
v4:
- s/GEN_MASK/GEN_MASK_ULL, s/BIT/BIT_ULL for xe_guc_reclaim_entry (CI)
- Revised comments to current changes (Tejas)
- Moved PAT macros back to original place.
v5:
- Add a new xe_page_reclaim_list_is_new() function that will indicate PRL has never been allocated. This is to avoid continuously allocating new PRL if there are multiple failed unbinds. Once a PRL is invalidated, the tlb inval range should fallback to default behavior and not allocate on scratch.
- Add xe_page_reclaim_list_entries_put into xe_page_reclaim_list_invalidate. Modify code accordingly to accomadate change.
- Use xe_page_reclaim_list_valid() helper for clarity. (Matthew B)
- Remove unnecessary null check on put in tlb inval job. (Matthew B)
v6:
- Rebase and checkpatch fixes.
Brian Nguyen (8):
drm/xe/xe_tlb_inval: Modify fence interface to support PPC flush drm/xe/guc: Add page reclamation interface to GuC
drm/xe: Create page reclaim list on unbind
drm/xe: Suballocate BO for page reclaim
drm/xe: Prep page reclaim in tlb inval job
drm/xe: Append page reclamation action to tlb inval drm/xe: Optimize flushing of L2$ by skipping unnecessary page reclaim drm/xe: Add debugfs support for page reclamation
Matthew Brost (1):
drm/xe: Do not forward invalid TLB invalidation seqnos to upper layers
Oak Zeng (1):
drm/xe: Add page reclamation info to device info
drivers/gpu/drm/xe/Makefile | 1 + drivers/gpu/drm/xe/abi/guc_actions_abi.h | 2 + drivers/gpu/drm/xe/regs/xe_gtt_defs.h | 1 + drivers/gpu/drm/xe/xe_debugfs.c | 41 +++++++ drivers/gpu/drm/xe/xe_device_types.h | 9 ++ drivers/gpu/drm/xe/xe_guc.c | 4 + drivers/gpu/drm/xe/xe_guc_ct.c | 17 +++ drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + drivers/gpu/drm/xe/xe_guc_tlb_inval.c | 37 ++++-- drivers/gpu/drm/xe/xe_page_reclaim.c | 136 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_page_reclaim.h | 105 +++++++++++++++++ drivers/gpu/drm/xe/xe_pat.c | 8 ++ drivers/gpu/drm/xe/xe_pat.h | 10 ++ drivers/gpu/drm/xe/xe_pci.c | 1 + drivers/gpu/drm/xe/xe_pci_types.h | 1 + drivers/gpu/drm/xe/xe_pt.c | 135 +++++++++++++++++++++- drivers/gpu/drm/xe/xe_pt_types.h | 5 + drivers/gpu/drm/xe/xe_tile.c | 5 + drivers/gpu/drm/xe/xe_tlb_inval.c | 27 ++++- drivers/gpu/drm/xe/xe_tlb_inval.h | 2 +- drivers/gpu/drm/xe/xe_tlb_inval_job.c | 36 +++++- drivers/gpu/drm/xe/xe_tlb_inval_job.h | 4 + drivers/gpu/drm/xe/xe_tlb_inval_types.h | 5 +- drivers/gpu/drm/xe/xe_vm.c | 4 +- 24 files changed, 581 insertions(+), 16 deletions(-) create mode 100644 drivers/gpu/drm/xe/xe_page_reclaim.c create mode 100644 drivers/gpu/drm/xe/xe_page_reclaim.h
Signature · 1 line
2.52.0