drm/amdkfd: Remove GWS from process during uninit
Subsystems (3)
PATCH 1/1 drm/amdkfd: Remove GWS from process during uninit
If we shut down a process without having destroyed its GWS-using queues, it is possible that GWS BO will still be in the process BO list during the gpuvm destruction. This list should be empty at that time, so we should remove the GWS allocation at the process uninit point if it is still around.
--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +3 -0
@@ -150,6 +150,9 @@ void pqm_uninit(struct process_queue_manager *pqm)struct process_queue_node *pqn, *next;list_for_each_entry_safe (pqn, next, &pqm->queues, process_queue_list) { +if (pqn->q && pqn->q->gws) +amdgpu_amdkfd_remove_gws_from_process (pqm->process->kgd_process_info, + pqn->q->gws);uninit_queue (pqn->q);list_del (&pqn->process_queue_list);kfree (pqn);
Signature · 6 lines
2.19.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190717145830.9004-1-Joseph.Greathouse-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Greathouse, Joseph <[email protected]>
Sent: Wednesday, July 17, 2019 10:58 AM
To: [email protected]
Cc: Greathouse, Joseph
Subject: [PATCH] drm/amdkfd: Remove GWS from process during uninit
If we shut down a process without having destroyed its GWS-using queues, it is possible that GWS BO will still be in the process BO list during the gpuvm destruction. This list should be empty at that time, so we should remove the GWS allocation at the process uninit point if it is still around.
--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +3 -0
@@ -150,6 +150,9 @@ void pqm_uninit(struct process_queue_manager *pqm)struct process_queue_node *pqn, *next;list_for_each_entry_safe (pqn, next, &pqm->queues, process_queue_list) { +if (pqn->q && pqn->q->gws) +amdgpu_amdkfd_remove_gws_from_process (pqm->process->kgd_process_info, + pqn->q->gws);uninit_queue (pqn->q);list_del (&pqn->process_queue_list);kfree (pqn);
--
2.19.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Kuehling, Felix
Reviewed-by Felix KuehlingQuoted 8 lines · Joseph
If we shut down a process without having destroyed its GWS-using queues, it is possible that GWS BO will still be in the process BO list during the gpuvm destruction. This list should be empty at that time, so we should remove the GWS allocation at the process uninit point if it is still around.
Change-Id I098e7b315070dd5b0165bb7905aef643450f27f2Signed-off-by Joseph Greathouse <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c void pqm_uninit(struct process_queue_manager *pqm) · line 158
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +3
-0@@ -150,6 +150,9 @@ void pqm_uninit(struct process_queue_manager *pqm)struct process_queue_node *pqn, *next;list_for_each_entry_safe (pqn, next, &pqm->queues, process_queue_list) { +if (pqn->q && pqn->q->gws) +amdgpu_amdkfd_remove_gws_from_process (pqm->process->kgd_process_info, + pqn->q->gws);uninit_queue (pqn->q);list_del (&pqn->process_queue_list);kfree (pqn);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx