drm/amdkfd: Cleanup workqueue during module unload
Subsystems (3)
PATCH 1/1 drm/amdkfd: Cleanup workqueue during module unload
Destroy the high priority workqueue that handles interrupts during KFD node cleanup.
--- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +2 -0
@@ -104,6 +104,8 @@ void kfd_interrupt_exit(struct kfd_node *node)*/ flush_workqueue (node->ih_wq); +destroy_workqueue (node->ih_wq); +kfifo_free (&node->ih_fifo); }
Signature · 1 line
2.35.1
Quoted 4 lines · Mukul Joshi
Destroy the high priority workqueue that handles interrupts during KFD node cleanup.
Signed-off-by Mukul Joshi <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +2
-0@@ -104,6 +104,8 @@ void kfd_interrupt_exit(struct kfd_node *node)*/ flush_workqueue (node->ih_wq); +destroy_workqueue (node->ih_wq); +kfifo_free (&node->ih_fifo); }
Quoted 16 lines · Mukul Joshi
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Destroy the high priority workqueue that handles interrupts during KFD node cleanup.
Signed-off-by Mukul Joshi<[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c void kfd_interrupt_exit(struct kfd_node *node) · line 108
Quoted 5 lines
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +2
-0@@ -104,6 +104,8 @@ void kfd_interrupt_exit(struct kfd_node *node)*/ flush_workqueue (node->ih_wq); +destroy_workqueue (node->ih_wq); +
Here I think we should cancel work items that are still in the work queue, not flush workqueue node->ih_wq. In this case the kfd functions have been terminated, there is no way to handle the left work items. That would make work queue flush never finish. I think it is the reason there are orphan kernel tasks.
After cancel left work items we can call destroy_workqueue.
Regards
Xiaogang
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +0
-1kfifo_free (&node->ih_fifo); } --2.35.1