Skip to content

Commit

Permalink
drm/amdgpu: Raise KFD system memory limits to 29/32
Browse files Browse the repository at this point in the history
Change-Id: I6ab918e3c05b6079154d97e76e473c3820f136e5
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
  • Loading branch information
Felix Kuehling authored and Kent Russell committed Apr 4, 2019
1 parent 815a001 commit 4b81218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ static bool check_if_add_bo_to_vm(struct amdgpu_vm *avm,
}

/* Set memory usage limits. Current, limits are
* System (TTM + userptr) memory - 3/4th System RAM
* TTM memory - 3/8th System RAM
* System (TTM + userptr) memory - 29/32th System RAM
* TTM memory - 29/32th System RAM
*/
void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
{
Expand All @@ -107,8 +107,8 @@ void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
mem *= si.mem_unit;

spin_lock_init(&kfd_mem_limit.mem_limit_lock);
kfd_mem_limit.max_system_mem_limit = (mem >> 1) + (mem >> 2);
kfd_mem_limit.max_ttm_mem_limit = (mem >> 1) - (mem >> 3);
kfd_mem_limit.max_system_mem_limit = mem - (3 * (mem >> 5)); /* 29/32 */
kfd_mem_limit.max_ttm_mem_limit = mem - (3 * (mem >> 5)); /* 29/32 */
pr_debug("Kernel memory limit %lluM, TTM limit %lluM\n",
(kfd_mem_limit.max_system_mem_limit >> 20),
(kfd_mem_limit.max_ttm_mem_limit >> 20));
Expand Down

0 comments on commit 4b81218

Please sign in to comment.