]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: option to disable system mem limit
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 27 Jul 2020 13:06:18 +0000 (09:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2020 19:43:08 +0000 (15:43 -0400)
commit391c877d0def5f6995e29d897275539a15c6b592
tree5a10a07aa20af5d5414d7991a7a00b5c6652e59a
parent3bb642c510833657e2ddfdbbaa2c9855caedbcd3
drm/amdkfd: option to disable system mem limit

If multiple process share system memory through /dev/shm, KFD allocate
memory should not fail if it reaches the system memory limit because
one copy of physical system memory are shared by multiple process.

Add module parameter no_system_mem_limit to provide user option to
disable system memory limit check at runtime using sysfs or during
driver module init using kernel boot argument. By default the system
memory limit is on.

Print out debug message to warn user if KFD allocate memory failed
because system memory reaches limit.

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/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c