drm/amdkfd: avoid svm dump when dynamic debug disabled
Set dynamic_svm_range_dump macro to avoid iterating over SVM lists from svm_range_debug_dump when dynamic debug is disabled. Otherwise, it could drop performance, specially with big number of SVM ranges. Make sure both svm_range_set_attr and svm_range_debug_dump functions are dynamically enabled to print svm_range_debug_dump debug traces. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Tested-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
abbd6cfb1d
commit
8923137dbe
1 changed files with 3 additions and 1 deletions
|
@ -46,6 +46,8 @@
|
||||||
* page table is updated.
|
* page table is updated.
|
||||||
*/
|
*/
|
||||||
#define AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING (2UL * NSEC_PER_MSEC)
|
#define AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING (2UL * NSEC_PER_MSEC)
|
||||||
|
#define dynamic_svm_range_dump(svms) \
|
||||||
|
_dynamic_func_call_no_desc("svm_range_dump", svm_range_debug_dump, svms)
|
||||||
|
|
||||||
/* Giant svm range split into smaller ranges based on this, it is decided using
|
/* Giant svm range split into smaller ranges based on this, it is decided using
|
||||||
* minimum of all dGPU/APU 1/32 VRAM size, between 2MB to 1GB and alignment to
|
* minimum of all dGPU/APU 1/32 VRAM size, between 2MB to 1GB and alignment to
|
||||||
|
@ -3563,7 +3565,7 @@ out_unlock_range:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
svm_range_debug_dump(svms);
|
dynamic_svm_range_dump(svms);
|
||||||
|
|
||||||
mutex_unlock(&svms->lock);
|
mutex_unlock(&svms->lock);
|
||||||
mmap_read_unlock(mm);
|
mmap_read_unlock(mm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue