From: Matthew Brost <matthew.brost@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, christian.koenig@amd.com,
ltuikov89@gmail.com, daniel@ffwll.ch, felix.kuehling@amd.com
Subject: [PATCH] drm/sched: Only start TDR in drm_sched_job_begin on first job
Date: Wed, 24 Jul 2024 16:44:17 -0700 [thread overview]
Message-ID: <20240724234417.1912357-1-matthew.brost@intel.com> (raw)
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
next reply other threads:[~2024-07-24 23:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 23:44 Matthew Brost [this message]
2024-07-24 23:49 ` ✓ CI.Patch_applied: success for drm/sched: Only start TDR in drm_sched_job_begin on first job 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240724234417.1912357-1-matthew.brost@intel.com \
--to=matthew.brost@intel.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=ltuikov89@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox