Skip to content

Commit

Permalink
drm/amdkfd: Signal eviction fence on process destruction (v2)
Browse files Browse the repository at this point in the history
Otherwise BOs may wait for the fence indefinitely and never be destroyed.

v2: Signal the fence right after destroying queues to avoid unnecessary
    delaye-delete in kfd_process_wq_release

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: xinhui pan <xinhui.pan@amd.com>
  • Loading branch information
Felix Kuehling authored and Felix Kuehling committed Mar 9, 2020
1 parent 2f9579f commit b6e6e4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/amd/amdkfd/kfd_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,11 @@ static void kfd_process_notifier_release(struct mmu_notifier *mn,

/* Indicate to other users that MM is no longer valid */
p->mm = NULL;
/* Signal the eviction fence after user mode queues are
* destroyed. This allows any BOs to be freed without
* triggering pointless evictions or waiting for fences.
*/
dma_fence_signal(p->ef);

mutex_unlock(&p->mutex);

Expand Down

0 comments on commit b6e6e4a

Please sign in to comment.