mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/amdgpu: add eviction counter
Keep track of the number of evictions since boot. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
0eaeb070ed
commit
dbd5ed60ac
@@ -397,6 +397,11 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo,
|
||||
return -EINVAL;
|
||||
|
||||
adev = amdgpu_get_adev(bo->bdev);
|
||||
|
||||
/* remember the eviction */
|
||||
if (evict)
|
||||
atomic64_inc(&adev->num_evictions);
|
||||
|
||||
if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) {
|
||||
amdgpu_move_null(bo, new_mem);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user