]> www.infradead.org Git - users/hch/configfs.git/commit
drm/xe: Add timeout to preempt fences
authorMatthew Brost <matthew.brost@intel.com>
Wed, 26 Jun 2024 00:41:37 +0000 (17:41 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Wed, 3 Jul 2024 22:27:50 +0000 (15:27 -0700)
commit627c961d672d3304564455ba471f5e4405170eec
tree83822e87c75c619a266e1ba636996b9fdf05efb0
parent7c0389c615b5c6aef1b0e38e30db759b3cbff885
drm/xe: Add timeout to preempt fences

To adhere to dma fencing rules that fences must signal within a
reasonable amount of time, add a 5 second timeout to preempt fences. If
this timeout occurs, kill the associated VM as this fatal to the VM.

v2:
 - Add comment for smp_wmb (Checkpatch)
 - Fix kernel doc typo (Inspection)
 - Add comment for killed check (Niranjana)
v3:
 - Drop smp_wmb (Matthew Auld)
 - Don't take vm->lock in preempt fence worker (Matthew Auld)
 - Drop RB given changes to patch
v4:
 - Add WRITE/READ_ONCE (Niranjana)
 - Don't export xe_vm_kill (Niranjana)

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Tested-by: Stuart Summers <stuart.summers@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240626004137.4060806-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_exec_queue_types.h
drivers/gpu/drm/xe/xe_execlist.c
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_preempt_fence.c
drivers/gpu/drm/xe/xe_vm.c