mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/amdgpu: skip clearing empty freed VM list on GEM close
amdgpu_vm_clear_freed() allocates an amdgpu_sync object and walks the VM
reservation fences via amdgpu_sync_resv() before checking whether vm->freed
has anything to clear. Return early when the list is empty to skip this
overhead on a hot path (every GEM close and command submission).
Signed-off-by: Bob Zhou <bobzhou2@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8ba869e852)
This commit is contained in:
parent
17da841055
commit
e3a721753f
|
|
@ -1553,6 +1553,8 @@ int amdgpu_vm_clear_freed(struct amdgpu_device *adev,
|
|||
struct amdgpu_sync sync;
|
||||
int r;
|
||||
|
||||
if (list_empty(&vm->freed))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Implicitly sync to command submissions in the same VM before
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user