Skip to content

Commit 6f9eea4

Browse files
amd-jherichuangalexdeucher
authored andcommitted
drm/amdkfd: Fix a memory limit issue
It is to resolve a regression, which fails to allocate VRAM due to no free memory in application, the reason is we add check of vram_pin_size for memory limit, and application is pinning the memory for Peerdirect, KFD should not count it in memory limit. So removing vram_pin_size will resolve it. Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 192039f commit 6f9eea4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev,
171171
(kfd_mem_limit.ttm_mem_used + ttm_mem_needed >
172172
kfd_mem_limit.max_ttm_mem_limit) ||
173173
(adev && adev->kfd.vram_used + vram_needed >
174-
adev->gmc.real_vram_size -
175-
atomic64_read(&adev->vram_pin_size) -
176-
reserved_for_pt)) {
174+
adev->gmc.real_vram_size - reserved_for_pt)) {
177175
ret = -ENOMEM;
178176
goto release;
179177
}

0 commit comments

Comments
 (0)