All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] drm/amdkfd: Signal eviction fence on process destruction (v2)
       [not found]   ` <72EFF772-7B30-4BCC-8DC5-E985100C31B8@amd.com>
@ 2020-03-05 16:06     ` Felix Kuehling
  2020-03-06  9:39       ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Kuehling @ 2020-03-05 16:06 UTC (permalink / raw)
  To: Pan, Xinhui; +Cc: Xu, Feifei, Koenig, Christian, amd-gfx@lists.freedesktop.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] drm/amdkfd: Signal eviction fence on process destruction (v2)
  2020-03-05 16:06     ` [PATCH 2/2] drm/amdkfd: Signal eviction fence on process destruction (v2) Felix Kuehling
@ 2020-03-06  9:39       ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2020-03-06  9:39 UTC (permalink / raw)
  To: Felix Kuehling, Pan, Xinhui
  Cc: Xu, Feifei, Koenig, Christian, amd-gfx@lists.freedesktop.org

Yeah, that one looks important. Feel free to add an Acked-by: Christian 
König <christian.koenig@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@amd.com>
>>
>>> 2020年3月5日 05:50,Kuehling, Felix <Felix.Kuehling@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@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-06  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200304210637.27283-3-Felix.Kuehling@amd.com>
     [not found] ` <20200304215023.11551-1-Felix.Kuehling@amd.com>
     [not found]   ` <72EFF772-7B30-4BCC-8DC5-E985100C31B8@amd.com>
2020-03-05 16:06     ` [PATCH 2/2] drm/amdkfd: Signal eviction fence on process destruction (v2) Felix Kuehling
2020-03-06  9:39       ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.