drm/amdgpu/scheduler: job ibs should also be freed
Subsystems (2)
PATCH 1/1 drm/amdgpu/scheduler: job ibs should also be freed
--- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +5 -3
@@ -222,18 +222,20 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched, amd_sched_entity_is_idle(entity));amd_sched_entity_set_rq (entity,NULL );if (r) { -struct amd_sched_job *job; +struct amd_sched_job *s_job;/* Park the kernel for a moment to make sure it isn't processing * our enity. */ kthread_park (sched->thread);kthread_unpark (sched->thread); -while ((job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { -struct amd_sched_fence *s_fence = job->s_fence; +while ((s_job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { +struct amd_sched_fence *s_fence = s_job->s_fence; +struct amdgpu_job *job =to_amdgpu_job (s_job);amd_sched_fence_scheduled (s_fence);dma_fence_set_error (&s_fence->finished, -ESRCH ); +amdgpu_job_free_resources (job);amd_sched_fence_finished (s_fence); } }
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1508844677-15144-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org
I don't see why we need this, can you explain more about it ?
the " amdgpu_job_free_resources(job);" should already invoked before the job pushed to scheduler, so after " amd_sched_fence_finished(s_fence);" the IB SABO would be released
BR Monk
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Jim Qu
Sent: 2017年10月24日 19:31
To: [email protected]
Cc: Qu, Jim <[email protected]>
Subject: [PATCH] drm/amdgpu/scheduler: job ibs should also be freed
--- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +5 -3
@@ -222,18 +222,20 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched, amd_sched_entity_is_idle(entity));amd_sched_entity_set_rq (entity,NULL );if (r) { -struct amd_sched_job *job; +struct amd_sched_job *s_job;/* Park the kernel for a moment to make sure it isn't processing * our enity. */ kthread_park (sched->thread);kthread_unpark (sched->thread); -while ((job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { -struct amd_sched_fence *s_fence = job->s_fence; +while ((s_job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { +struct amd_sched_fence *s_fence = s_job->s_fence; +struct amdgpu_job *job =to_amdgpu_job (s_job);amd_sched_fence_scheduled (s_fence);dma_fence_set_error (&s_fence->finished, -ESRCH ); +amdgpu_job_free_resources (job);amd_sched_fence_finished (s_fence); } }
Signature · 10 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BLUPR12MB044951F20B635ED6F8F3CD7884440-7LeqcoF/[email protected]
Yeah, I saw that code.
There is a issue that will get calltrace in "ib_get" blocked by waiting_fence on RHEL6.9. I make a misunderstand to add amdgpu_job_free_resources(job). Actually, the key point is kthread_park() which is not implemented on RHEL6.9 kernel(2.6.32).
Please ignore this patch.
Thanks
JimQu
________________________________________
发件人: Liu, Monk
发送时间: 2017年10月25日 11:14
收件人: Qu, Jim; [email protected]
抄送: Qu, Jim
主题: RE: [PATCH] drm/amdgpu/scheduler: job ibs should also be freed
I don't see why we need this, can you explain more about it ?
the " amdgpu_job_free_resources(job);" should already invoked before the job pushed to scheduler, so after " amd_sched_fence_finished(s_fence);" the IB SABO would be released
BR Monk
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Jim Qu
Sent: 2017年10月24日 19:31
To: [email protected]
Cc: Qu, Jim <[email protected]>
Subject: [PATCH] drm/amdgpu/scheduler: job ibs should also be freed
--- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +5 -3
@@ -222,18 +222,20 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched, amd_sched_entity_is_idle(entity));amd_sched_entity_set_rq (entity,NULL );if (r) { -struct amd_sched_job *job; +struct amd_sched_job *s_job;/* Park the kernel for a moment to make sure it isn't processing * our enity. */ kthread_park (sched->thread);kthread_unpark (sched->thread); -while ((job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { -struct amd_sched_fence *s_fence = job->s_fence; +while ((s_job =to_amd_sched_job (spsc_queue_pop (&entity->job_queue)))) { +struct amd_sched_fence *s_fence = s_job->s_fence; +struct amdgpu_job *job =to_amdgpu_job (s_job);amd_sched_fence_scheduled (s_fence);dma_fence_set_error (&s_fence->finished, -ESRCH ); +amdgpu_job_free_resources (job);amd_sched_fence_finished (s_fence); } }
--
1.9.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx