Skip to content

Implement clear VRAM on free

Matthew Brost intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 5 repliesIn review
  2. v24 patches 0 repliesSuperseded
  3. v11 patch 24 repliesSuperseded

Changes in v3 from the cover letter

- Fix kunit

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/xe: Only use delayed worker to destroy userptr VMAsdrivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm_types.h+48 -450 replies
2/4drm/xe: Drop BO argument from xe_migrate_cleardrivers/gpu/drm/xe/tests/xe_migrate.c drivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_migrate.c +1 more+38 -190 replies
3/4drm/xe: Add xe_bo_tt_has_data helperdrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_bo.h+20 -32 replies
4/4drm/xe: Implement clear VRAM on freedrivers/gpu/drm/xe/xe_bo.c drivers/gpu/drm/xe/xe_migrate.c drivers/gpu/drm/xe/xe_migrate.h +3 more+108 -103 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchMatthew Auld
1/4
2/4
3/4R-b
4/4

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

Read the v3 thread

Cover letter [PATCH v3 0/4] Implement clear VRAM on free

Do not use a delayed worker to destroy BO VMAs. Drop the BO argument from xe_migrate_clear, as this function can be called with a BO that has a zero reference count. Finally, implement VRAM clearing on free.

Avoiding a delayed worker for BO VMA destruction ensures timely finalization of the BO during unbind, which should improve the performance of clear-on-free. This change is therefore included in this series.

v3:
- Fix kunit

Matt

Matthew Brost (4):
drm/xe: Only use delayed worker to destroy userptr VMAs drm/xe: Drop BO argument from xe_migrate_clear drm/xe: Add xe_bo_tt_has_data helper
drm/xe: Implement clear VRAM on free

 drivers/gpu/drm/xe/tests/xe_migrate.c | 22 +++++---
 drivers/gpu/drm/xe/xe_bo.c            | 75 +++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_bo.h            |  2 +
 drivers/gpu/drm/xe/xe_migrate.c       | 50 +++++++++++------
 drivers/gpu/drm/xe/xe_migrate.h       |  9 ++-
 drivers/gpu/drm/xe/xe_res_cursor.h    | 26 +++++++++
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c  |  6 +-
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.h  |  6 ++
 drivers/gpu/drm/xe/xe_vm.c            | 80 ++++++++++++++-------------
 drivers/gpu/drm/xe/xe_vm_types.h      | 13 ++---
 10 files changed, 213 insertions(+), 76 deletions(-)
Signature · 1 line
2.34.1