mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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>
This commit is contained in:
@@ -631,7 +631,7 @@ enum kfd_pdd_bound {
|
||||
PDD_BOUND_SUSPENDED,
|
||||
};
|
||||
|
||||
#define MAX_SYSFS_FILENAME_LEN 11
|
||||
#define MAX_SYSFS_FILENAME_LEN 15
|
||||
|
||||
/*
|
||||
* SDMA counter runs at 100MHz frequency.
|
||||
@@ -692,6 +692,13 @@ struct kfd_process_device {
|
||||
uint64_t sdma_past_activity_counter;
|
||||
struct attribute attr_sdma;
|
||||
char sdma_filename[MAX_SYSFS_FILENAME_LEN];
|
||||
|
||||
/* Eviction activity tracking */
|
||||
uint64_t last_evict_timestamp;
|
||||
atomic64_t evict_duration_counter;
|
||||
struct attribute attr_evict;
|
||||
|
||||
struct kobject *kobj_stats;
|
||||
};
|
||||
|
||||
#define qpd_to_pdd(x) container_of(x, struct kfd_process_device, qpd)
|
||||
|
||||
Reference in New Issue
Block a user