Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v1 0/9] Parallel submission of dma fence jobs and LR jobs with shared hardware resources
@ 2024-07-17 13:07 Francois Dugast
  2024-07-17 13:07 ` [RFC v1 1/9] drm/xe/hw_engine_group: Introduce xe_hw_engine_group Francois Dugast
                   ` (9 more replies)
  0 siblings, 10 replies; 32+ messages in thread
From: Francois Dugast @ 2024-07-17 13:07 UTC (permalink / raw)
  To: intel-xe; +Cc: matthew.brost, thomas.hellstrom, Francois Dugast

Currently Xe KMD only allows either all VMs on the device to be page-faulting
VMs, or none of them to be page-faulting VMs. This prevents page-faulting
workloads from waiting for a dma-fence in the fault handler, as the page fault
would then hold the execution resources, which means the dma-fence would never
signal and this would create a deadlock.

This limitation in the driver prevents mixing dma-fence jobs and long-running
faulting jobs, for example if an application would submit 3D jobs for the
compositor but also SVM compute jobs on the same device. To safely lift this
restriction, a finer approach is introduced in this series.

Hardware engines which share resources and would block each other are assigned
to the same hardware engine group. This group ensures mutual exclusion of the
execution of dma fence jobs and long running jobs on the shared hardware
resources.

If a long running job is executing when a dma fence job is submitted, the long
running job is preempted, the dma fence job executes, then the long running
job is resumed. If a dma fence job is executing when a long running job is
submitted, we wait for completion of the dma fence job before executing the
long running job.

This has been tested on PVC with new IGT tests [1].

[1] https://patchwork.freedesktop.org/series/136191/

Francois Dugast (9):
  drm/xe/hw_engine_group: Introduce xe_hw_engine_group
  drm/xe/exec_queue: Add list link for the hw engine group
  drm/xe/hw_engine_group: Register hw engine group's exec queues
  drm/xe/hw_engine_group: Add helper to suspend LR jobs
  drm/xe/hw_engine_group: Add helper to wait for dma fence jobs
  drm/xe/hw_engine_group: Ensure safe transition between execution modes
  drm/xe/exec: Switch hw engine group execution mode upon job submission
  drm/xe/hw_engine_group: Resume LR exec queues suspended by dma fence
    jobs
  drm/xe/vm: Remove restriction that all VMs must be faulting if one is

 drivers/gpu/drm/xe/xe_device.h           |  10 -
 drivers/gpu/drm/xe/xe_exec.c             |  14 +-
 drivers/gpu/drm/xe/xe_exec_queue.c       |   7 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h |   2 +
 drivers/gpu/drm/xe/xe_hw_engine.c        | 256 +++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine.h        |   9 +
 drivers/gpu/drm/xe/xe_hw_engine_types.h  |  31 +++
 drivers/gpu/drm/xe/xe_vm.c               |   8 -
 8 files changed, 318 insertions(+), 19 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2024-08-15 14:56 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 13:07 [RFC v1 0/9] Parallel submission of dma fence jobs and LR jobs with shared hardware resources Francois Dugast
2024-07-17 13:07 ` [RFC v1 1/9] drm/xe/hw_engine_group: Introduce xe_hw_engine_group Francois Dugast
2024-07-17 19:29   ` Matthew Brost
2024-07-22  7:40     ` Francois Dugast
2024-07-17 13:07 ` [RFC v1 2/9] drm/xe/exec_queue: Add list link for the hw engine group Francois Dugast
2024-07-17 19:31   ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 3/9] drm/xe/hw_engine_group: Register hw engine group's exec queues Francois Dugast
2024-07-17 19:38   ` Matthew Brost
2024-07-17 19:42   ` Matthew Brost
2024-07-17 20:09   ` Matthew Brost
2024-07-22  8:17     ` Francois Dugast
2024-07-22 17:50       ` Matthew Brost
2024-08-13 12:24     ` Thomas Hellström
2024-08-15 14:55       ` Matthew Brost
2024-07-17 23:19   ` Matthew Brost
2024-07-22  8:31     ` Francois Dugast
2024-07-22 17:47       ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 4/9] drm/xe/hw_engine_group: Add helper to suspend LR jobs Francois Dugast
2024-07-17 19:49   ` Matthew Brost
2024-07-17 23:09   ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 5/9] drm/xe/hw_engine_group: Add helper to wait for dma fence jobs Francois Dugast
2024-07-17 20:18   ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 6/9] drm/xe/hw_engine_group: Ensure safe transition between execution modes Francois Dugast
2024-07-17 22:54   ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 7/9] drm/xe/exec: Switch hw engine group execution mode upon job submission Francois Dugast
2024-07-17 22:57   ` Matthew Brost
2024-07-18  2:09     ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 8/9] drm/xe/hw_engine_group: Resume LR exec queues suspended by dma fence jobs Francois Dugast
2024-07-17 23:03   ` Matthew Brost
2024-07-17 13:07 ` [RFC v1 9/9] drm/xe/vm: Remove restriction that all VMs must be faulting if one is Francois Dugast
2024-07-17 23:05   ` Matthew Brost
2024-07-17 13:15 ` ✗ CI.Patch_applied: failure for Parallel submission of dma fence jobs and LR jobs with shared hardware resources Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox