drm/amdgpu: Add KFD VRAM limit checking
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 20 Nov 2018 01:05:54 +0000 (20:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Dec 2018 23:13:15 +0000 (18:13 -0500)
commit611736d8447c0c48a172db0b968dddae60696a72
tree45e17c7fdbb3ea51fbd4d4fdbae3bf9545c360f4
parent5634e38cda7ba47f9e0f372cf1e1729a845d3348
drm/amdgpu: Add KFD VRAM limit checking

We don't want KFD processes evicting each other over VRAM usage.
Therefore prevent overcommitting VRAM among KFD applications with
a per-GPU limit. Also leave enough room for page tables on top
of the application memory usage.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c