Re: [PATCH 2/2] drm/amdkfd: Signal eviction fence on process destruction (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, that one looks important. Feel free to add an Acked-by: Christian König <christian.koenig@xxxxxxx>.
Regards,
Christian.

Am 05.03.20 um 17:06 schrieb Felix Kuehling:
[moving to public mailing list]

Thank you. I'll also apply patch 2/2 to amd-staging-drm-next. It's not fixing a memory leak there, but it should make cleanup after process termination more efficient by avoiding delayed delete of BOs.
Regards,
  Felix

On 2020-03-04 10:46 p.m., Pan, Xinhui wrote:
Series is Reviewed-by: xinhui pan <xinhui.pan@xxxxxxx>

2020年3月5日 05:50,Kuehling, Felix <Felix.Kuehling@xxxxxxx> 写道:

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@xxxxxxx>
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index d5d4660221af..26f7f178b66d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -625,6 +625,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);

--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux