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

Christian König ckoenig.leichtzumerken at gmail.com
Fri Mar 6 09:39:08 UTC 2020


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

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 at amd.com>
>>
>>> 2020年3月5日 05:50,Kuehling, Felix <Felix.Kuehling at amd.com> 写道:
>>>
>>> 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 at amd.com>
>>> ---
>>> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list