aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_events.h
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2022-04-07 22:08:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-04-12 14:20:13 -0400
commit34d292d57973dd432e93425de33f8f120cfbdab3 (patch)
tree946e92bf1fff15528d472892f0993ea6f176e813 /drivers/gpu/drm/amd/amdkfd/kfd_events.h
parentdrm/amd/display: expose skip_detection_link_training to debugfs (diff)
downloadlinux-dev-34d292d57973dd432e93425de33f8f120cfbdab3.tar.xz
linux-dev-34d292d57973dd432e93425de33f8f120cfbdab3.zip
drm/amdkfd: Asynchronously free events
The synchronize_rcu call in destroy_events can take several ms, which noticeably slows down applications destroying many events. Use kfree_rcu to free the event structure asynchronously and eliminate the synchronize_rcu call in the user thread. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_events.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_events.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.h b/drivers/gpu/drm/amd/amdkfd/kfd_events.h
index 55d376f56021..1c62c8dd6460 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.h
@@ -70,6 +70,8 @@ struct kfd_event {
struct kfd_hsa_memory_exception_data memory_exception_data;
struct kfd_hsa_hw_exception_data hw_exception_data;
};
+
+ struct rcu_head rcu; /* for asynchronous kfree_rcu */
};
#define KFD_EVENT_TIMEOUT_IMMEDIATE 0