Skip to content

drm/xe/vf: New approach for post-migration LRC fixups

Tomasz Lis intel-xe 7 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest3 patches 0 repliesNew
  2. v62 patches 1 replySuperseded
  3. v52 patches 0 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v42 patches0 repliesSuperseded
v32 patches0 repliesSuperseded
v22 patches0 repliesSuperseded
v12 patches0 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/xe/lrc: Snapshot configfs ctx_restore_post_bb at probedrivers/gpu/drm/xe/xe_device.c drivers/gpu/drm/xe/xe_device_types.h drivers/gpu/drm/xe/xe_lrc.c +1 more+56 -40 replies
2/3drm/xe/vf: Late fixups of LRCs after VF migrationdrivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_exec_queue.h drivers/gpu/drm/xe/xe_gt_sriov_vf.c +3 more+44 -430 replies
3/3drm/xe: After VF migration, repeat BO mapping in progressdrivers/gpu/drm/xe/xe_exec_queue.c drivers/gpu/drm/xe/xe_ggtt.c drivers/gpu/drm/xe/xe_gt_sriov_vf.c +1 more+73 -370 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchAdam Miszczak
1/3
2/3T-b
3/3T-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/3] drm/xe/vf: New approach for post-migration LRC fixups

The current approach to LRC recovery requires caution from developers when modifying any LRC-related code. More flexible solution may allow to avoid future troubles.

The current code also includes LRC creation repeat which looks a bit suspicious - it was developed without detailed knowledge of which part of LRC creation requires a repeat. Now after extensive debug we know that the repeat is only required for BO mapping, and actually all BOs should be protected, not only the ones storing LRCs.

This fixes a very rare bug where BO would be incorrectly created during migration resulting in CAT error generated by GPU. Chances of triggering this error were well below 0.1%.

Included is also a patch which snapshots ctx_restore_post_bb during probe, to avoid creating extra dependencies between locks (especially the newly introduced scratch_lock and xe_configfs.su_mutex).

v2: A rebase after 6 months, with adjustments to current source.
v3: Re-adding a check carelessly removed in v2, fixed handling
GGTT start/end, fixed issue with signals.
v4: Several fixes to error paths (mutex creation, and prolonged
migration recovery while BO mapping). Altered BO insertion to not repeat placement in GGTT upon migration, only repeat the mapping.
v5: Disallow signals affecting BO insertion. Add cleanup of BO
mapping on recovery fail.
v6: Remove unneeded cleanup, comment on the caveats instead.
v7: Fix lockdep splat by snapshoting ctx_restore_post_bb.
Use guard for a lock (Satya).

Tomasz Lis (3):
drm/xe/lrc: Snapshot configfs ctx_restore_post_bb at probe drm/xe/vf: Late fixups of LRCs after VF migration drm/xe: After VF migration, repeat BO mapping in progress

 drivers/gpu/drm/xe/xe_device.c            |  5 ++
 drivers/gpu/drm/xe/xe_device_types.h      | 12 +++++
 drivers/gpu/drm/xe/xe_exec_queue.c        | 63 +++++++++++++----------
 drivers/gpu/drm/xe/xe_exec_queue.h        |  2 +-
 drivers/gpu/drm/xe/xe_ggtt.c              | 60 ++++++++++++++++++---
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c       | 23 +++++----
 drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h |  2 +
 drivers/gpu/drm/xe/xe_guc_submit.c        | 35 +++----------
 drivers/gpu/drm/xe/xe_guc_submit.h        |  2 -
 drivers/gpu/drm/xe/xe_lrc.c               | 42 +++++++++++++--
 drivers/gpu/drm/xe/xe_lrc.h               |  1 +
 drivers/gpu/drm/xe/xe_memirq.c            | 10 +++-
 12 files changed, 173 insertions(+), 84 deletions(-)
Signature · 1 line
2.43.0