diff options
author | 2021-06-22 00:12:32 -0400 | |
---|---|---|
committer | 2021-06-30 00:18:23 -0400 | |
commit | d4ebc2007040a0aff01bfe1b194085d3867328fd (patch) | |
tree | f8b304a6a5d46bcd60fcd96ab8b2b06e01b12dcb /drivers/gpu/drm/amd/amdkfd/kfd_svm.h | |
parent | drm/amdkfd: add sysfs counters for vm fault and migration (diff) | |
download | linux-d4ebc2007040a0aff01bfe1b194085d3867328fd.tar.gz linux-d4ebc2007040a0aff01bfe1b194085d3867328fd.tar.bz2 linux-d4ebc2007040a0aff01bfe1b194085d3867328fd.zip |
drm/amdkfd: implement counters for vm fault and migration
Add helper function to get process device data structure from adev to
update counters.
Update vm faults, page_in, page_out counters will no be executed in
parallel, use WRITE_ONCE to avoid any form of compiler optimizations.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_svm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h index 0c0fc399395e..a9af03994d1a 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.h @@ -174,6 +174,8 @@ void svm_range_dma_unmap(struct device *dev, dma_addr_t *dma_addr, unsigned long offset, unsigned long npages); void svm_range_free_dma_mappings(struct svm_range *prange); void svm_range_prefault(struct svm_range *prange, struct mm_struct *mm); +struct kfd_process_device * +svm_range_get_pdd_by_adev(struct svm_range *prange, struct amdgpu_device *adev); /* SVM API and HMM page migration work together, device memory type * is initialized to not 0 when page migration register device memory. |