drm/amdkfd: Add process eviction counters to sysfs
authorPhilip Cox <Philip.Cox@amd.com>
Tue, 30 Jun 2020 19:51:05 +0000 (15:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 18 Sep 2020 01:22:17 +0000 (21:22 -0400)
commit4327bed2ff8e3ddc57beb27fed8ad2faef240d72
tree405bee2ddaac963417208c8e0c22b931467a2bf4
parent8a491bb31ba40246ae15cbb3c044d72fb9e0d13e
drm/amdkfd: Add process eviction counters to sysfs

Add per-process eviction counters to sysfs to keep track of
how many eviction events have happened for each process.

v2: rename the stats dir, and track all evictions per process, per device.
v3: Simplify the stats kobject handling and cleanup.
v4: more code cleanup

Signed-off-by: Philip Cox <Philip.Cox@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_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c