drm/amdkfd: add sysfs counters for vm fault and migration
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 16 Jun 2021 13:51:47 +0000 (09:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Jun 2021 04:18:23 +0000 (00:18 -0400)
commit751580b3ff9ac6bf39da8586e132dbebee2409ef
tree6896c0cc26302082d042d4c58d99e31d6e6012cd
parentdcdb4d904b4bd3078fe8d4d24b1658560d6078ef
drm/amdkfd: add sysfs counters for vm fault and migration

This is part of SVM profiling API, export sysfs counters for
per-process, per-GPU vm retry fault, pages migrated in and out of GPU vram.

counters will not be updated in parallel in GPU retry fault handler and
migration to vram/ram path, use READ_ONCE to avoid compiler
optimization.

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_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c