Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/sched: Only start TDR in drm_sched_job_begin on first job
@ 2024-07-24 23:44 Matthew Brost
  2024-07-24 23:49 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Matthew Brost @ 2024-07-24 23:44 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-xe, christian.koenig, ltuikov89, daniel, felix.kuehling

Only start in drm_sched_job_begin on first job being added to the
pending list as if pending list non-empty the TDR has already been
started. It is problematic to restart the TDR as it will extend TDR
period for an already running job, potentially leading to dma-fence
signaling for a very long period of with continous stream of jobs.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/scheduler/sched_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 7e90c9f95611..feeeb9dbeb86 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -540,7 +540,8 @@ static void drm_sched_job_begin(struct drm_sched_job *s_job)
 
 	spin_lock(&sched->job_list_lock);
 	list_add_tail(&s_job->list, &sched->pending_list);
-	drm_sched_start_timeout(sched);
+	if (list_is_singular(&sched->pending_list))
+		drm_sched_start_timeout(sched);
 	spin_unlock(&sched->job_list_lock);
 }
 
-- 
2.34.1


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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 23:44 [PATCH] drm/sched: Only start TDR in drm_sched_job_begin on first job Matthew Brost
2024-07-24 23:49 ` ✓ CI.Patch_applied: success for " Patchwork
2024-07-24 23:49 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-24 23:50 ` ✓ CI.KUnit: success " Patchwork
2024-07-25  0:02 ` ✓ CI.Build: " Patchwork
2024-07-25  0:04 ` ✓ CI.Hooks: " Patchwork
2024-07-25  0:06 ` ✓ CI.checksparse: " Patchwork
2024-07-25  0:26 ` ✓ CI.BAT: " Patchwork
2024-07-25  1:29 ` ✗ CI.FULL: failure " Patchwork
2024-07-25  7:42 ` [PATCH] " Christian König
2024-07-25 14:50   ` Matthew Brost
2024-08-14  5:44     ` Matthew Brost
2024-07-25 12:50 ` ✗ CI.FULL: failure for " Patchwork

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