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; amd-gfx at lists.freedesktop.org æ??é??: 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:amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jim Qu Sent: 2017å¹´10æ??24æ?¥ 19:31 To: amd-gfx at lists.freedesktop.org Cc: Qu, Jim <Jim.Qu at amd.com> Subject: [PATCH] drm/amdgpu/scheduler: job ibs should also be freed Change-Id: I93bb283cfebfe203f777bb7bae390c9b9a7b5fd0 Signed-off-by: Jim Qu <Jim.Qu at amd.com> --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 9cbeade..0bcc737 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -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 amd-gfx at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx