drm/amdkfd: implement counters for vm fault and migration
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 22 Jun 2021 04:12:32 +0000 (00:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Jun 2021 04:18:23 +0000 (00:18 -0400)
commitd4ebc2007040a0aff01bfe1b194085d3867328fd
treef8b304a6a5d46bcd60fcd96ab8b2b06e01b12dcb
parent751580b3ff9ac6bf39da8586e132dbebee2409ef
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>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h