Skip to content

Fix serialization on burst of unbinds - v2

Matthew Brost intel-xe 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest6 patches 1 replyIn review
  2. v66 patches 0 repliesSuperseded
  3. v56 patches 9 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v45 patches4 repliesSuperseded
v32 patches1 replySuperseded
v22 patches0 repliesSuperseded
v11 patch10 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/xe: Enforce correct user fence signaling order usingdrivers/gpu/drm/xe/xe_exec.c drivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue_types.h +6 more+86 -180 replies
2/6drm/xe: Attach last fence to TLB invalidation job queuesdrivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue.h drivers/gpu/drm/xe/xe_exec_queue_types.h +3 more+156 -20 replies
3/6drm/xe: Decouple bind queue last fence from TLB invalidationsdrivers/gpu/drm/xe/xe_pt.c drivers/gpu/drm/xe/xe_sync.c drivers/gpu/drm/xe/xe_tlb_inval_job.c +3 more+143 -1100 replies
4/6drm/xe: Skip TLB invalidation waits in page fault bindsdrivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm_types.h+13 -20 replies
5/6drm/xe: Disallow input fences on zero batch execs and zero bindsdrivers/gpu/drm/xe/xe_sync.c+36 -650 replies
6/6drm/xe: Remove last fence dependency check from binds and execsdrivers/gpu/drm/xe/xe_exec.c drivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue.h +3 more+0 -540 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchMatthew BrostThomas Hellström
1/6Signed-of-by R-b
2/6R-b
3/6R-b
4/6
5/6
6/6R-b

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

Read the v7 thread

Cover letter [PATCH v7 0/6] Fix serialization on burst of unbinds - v2

Attempting to resolve part of [1]; this solution differs than v1 [2] by changing last fence semantics detailed in the patches.

Overview of issue in [1]:

When a burst of unbind jobs is issued, a dependency chain can form between the TLB invalidation of a previous unbind job and the current one. This leads to undesirable serialization, causing current jobs to wait unnecessarily for prior TLB invalidations, execute on the GPU when not needed, and significantly slow down the unbind burst—resulting in up to a 4× to 8× slowdown depending on platform.

Matt

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6047
[2] https://patchwork.freedesktop.org/series/156144/

Matthew Brost (6):
drm/xe: Enforce correct user fence signaling order using drm/xe: Attach last fence to TLB invalidation job queues drm/xe: Decouple bind queue last fence from TLB invalidations drm/xe: Skip TLB invalidation waits in page fault binds drm/xe: Disallow input fences on zero batch execs and zero binds drm/xe: Remove last fence dependency check from binds and execs

 drivers/gpu/drm/xe/xe_exec.c             |   7 +-
 drivers/gpu/drm/xe/xe_exec_queue.c       | 120 ++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_exec_queue.h       |  23 ++++-
 drivers/gpu/drm/xe/xe_exec_queue_types.h |  12 +++
 drivers/gpu/drm/xe/xe_migrate.c          |  14 +++
 drivers/gpu/drm/xe/xe_migrate.h          |   8 ++
 drivers/gpu/drm/xe/xe_oa.c               |  45 ++++++---
 drivers/gpu/drm/xe/xe_oa_types.h         |   8 ++
 drivers/gpu/drm/xe/xe_pt.c               |  80 +++++----------
 drivers/gpu/drm/xe/xe_sched_job.c        |  17 ----
 drivers/gpu/drm/xe/xe_sched_job.h        |   1 -
 drivers/gpu/drm/xe/xe_sync.c             |  91 ++++++++++-------
 drivers/gpu/drm/xe/xe_sync.h             |   3 +
 drivers/gpu/drm/xe/xe_sync_types.h       |   3 +
 drivers/gpu/drm/xe/xe_tlb_inval_job.c    |  31 ++++--
 drivers/gpu/drm/xe/xe_tlb_inval_job.h    |   5 +-
 drivers/gpu/drm/xe/xe_vm.c               |  97 +++++++++++-------
 drivers/gpu/drm/xe/xe_vm_types.h         |   6 +-
 18 files changed, 377 insertions(+), 194 deletions(-)
Signature · 1 line
2.34.1