From: Matthew Brost <matthew.brost@intel.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: <dri-devel@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <ltuikov89@gmail.com>,
<daniel@ffwll.ch>, <felix.kuehling@amd.com>
Subject: Re: [PATCH] drm/sched: Only start TDR in drm_sched_job_begin on first job
Date: Wed, 14 Aug 2024 05:44:43 +0000 [thread overview]
Message-ID: <ZrxES0mUqRsB/iDZ@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <ZqJmTpuTiYYQxXjA@DUT025-TGLU.fm.intel.com>
On Thu, Jul 25, 2024 at 02:50:54PM +0000, Matthew Brost wrote:
> On Thu, Jul 25, 2024 at 09:42:08AM +0200, Christian König wrote:
> > Am 25.07.24 um 01:44 schrieb Matthew Brost:
> > > 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.
> >
> > Mhm, that should be unnecessary. drm_sched_start_timeout() should only start
> > the timeout, but never re-start it.
> >
>
> That function checks the pending list for not empty, so it indeed starts
> it. Which is the correct behavior for some of the callers, e.g.
> drm_sched_tdr_queue_imm, drm_sched_get_finished_job
>
> IMO best to fix this here.
>
> Also FWIW on Xe I wrote a test which submitted a new ending spinner,
> then submitted a job every second on the same queue in a loop and
> observed the spinner not get canceled for a long time. After this patch,
> the spinner correctly timed out after 5 second (our default TDR period).
>
> Matt
Ping Christian. Any response to above?
Pretty clear problem, would like to resolve.
Matt
>
> > Could be that this isn't working properly.
> >
> > Regards,
> > Christian.
> >
> > >
> > > 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);
> > > }
> >
next prev parent reply other threads:[~2024-08-14 5:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=ZrxES0mUqRsB/iDZ@DUT025-TGLU.fm.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