From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: zhoucm1 <zhoucm1-5C7GfCeVMHo@public.gmane.org>,
"Ding, Pixel" <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>,
"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] drm/scheduler: don't update last scheduled fence in TDR
Date: Thu, 3 May 2018 14:09:59 +0200 [thread overview]
Message-ID: <76fa27af-3648-e0ee-758a-057ac2fcf113@gmail.com> (raw)
In-Reply-To: <2c43a4bf-dc5a-69e2-1d9f-02a4019d9d27-5C7GfCeVMHo@public.gmane.org>
That change is indeed fixing a problem. When drm_sched_job_recovery() is
called s_job->entity should already be NULL.
And even when the process is killed we should still either re-submit the
jobs or set the error.
BTW: There is another bug in that function: guilty_context needs to be
kept alive over the course of a loop.
Going to submit a patch for that.
Regards,
Christian.
Am 26.04.2018 um 06:23 schrieb zhoucm1:
> NAK on it.
>
> First of all, without this patch, Does it cause any issue?
>
> second,
>
> entity->last_scheduled present the last submiting job.
>
> Your this change will break this meaning and don't work, e.g.
>
> 1. mirror list has jobA and jobB, assuming they are belonged to same
> entity, then the entity->last_scheduled is jobB->finished.
>
> 2. when you do recovery, re-submit jobA first, if don't update
> last_scheduled, then entity->last_scheduled still is jobB->finished.
>
> 3. killed this process, will call to drm_sched_entity_cleanup, will
> register drm_sched_entity_kill_jobs_cb to jobB->finished, but jobB
> isn't submitted at all.
>
>
> So the change isn't necessary at all.
>
>
> Regards,
>
> David Zhou
>
>
> On 2018年04月26日 11:47, Ding, Pixel wrote:
>> Hi Monk,
>>
>> Please review it. Thanks.
>>
>> —
>> Sincerely Yours,
>> Pixel
>>
>>
>> On 2018/4/25, 4:39 PM, "Pixel Ding" <Pixel.Ding@amd.com> wrote:
>>
>> The current sequence in scheduler thread is:
>> 1. update last sched fence
>> 2. job begin (adding to mirror list)
>> 3. job finish (remove from mirror list)
>> 4. back to 1
>> Since we update last sched prior to joining mirror list,
>> the jobs
>> in mirror list already pass the last sched fence. TDR just run
>> the jobs in mirror list, so we should not update the last sched
>> fences in TDR.
>> Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
>> ---
>> drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 ---
>> 1 file changed, 3 deletions(-)
>> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> b/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> index 088ff2b..1f1dd70 100644
>> --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
>> @@ -575,9 +575,6 @@ void drm_sched_job_recovery(struct
>> drm_gpu_scheduler *sched)
>> fence = sched->ops->run_job(s_job);
>> atomic_inc(&sched->hw_rq_count);
>> - dma_fence_put(s_job->entity->last_scheduled);
>> - s_job->entity->last_scheduled =
>> dma_fence_get(&s_fence->finished);
>> -
>> if (fence) {
>> s_fence->parent = dma_fence_get(fence);
>> r = dma_fence_add_callback(fence, &s_fence->cb,
>> --
>> 2.7.4
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-05-03 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 8:39 [PATCH] drm/scheduler: don't update last scheduled fence in TDR Pixel Ding
[not found] ` <1524645589-16162-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2018-04-26 3:47 ` Ding, Pixel
[not found] ` <6A08CC55-19DC-46E1-9741-24CE89C49763-5C7GfCeVMHo@public.gmane.org>
2018-04-26 4:23 ` zhoucm1
[not found] ` <2c43a4bf-dc5a-69e2-1d9f-02a4019d9d27-5C7GfCeVMHo@public.gmane.org>
2018-05-03 12:09 ` Christian König [this message]
2018-05-07 1:00 ` Ding, Pixel
2018-04-26 3:48 ` Liu, Monk
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=76fa27af-3648-e0ee-758a-057ac2fcf113@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=Pixel.Ding-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=zhoucm1-5C7GfCeVMHo@public.gmane.org \
/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