Skip to content

Commit 366d6f1

Browse files
fxkamdkentrussell
authored andcommitted
drm/amdgpu: Raise KFD system memory limits to 29/32
Change-Id: I6ab918e3c05b6079154d97e76e473c3820f136e5 Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
1 parent ae525fb commit 366d6f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ static bool check_if_add_bo_to_vm(struct amdgpu_vm *avm,
8484
}
8585

8686
/* Set memory usage limits. Current, limits are
87-
* System (TTM + userptr) memory - 3/4th System RAM
88-
* TTM memory - 3/8th System RAM
87+
* System (TTM + userptr) memory - 29/32th System RAM
88+
* TTM memory - 29/32th System RAM
8989
*/
9090
void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
9191
{
@@ -97,8 +97,8 @@ void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
9797
mem *= si.mem_unit;
9898

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

0 commit comments

Comments
 (0)