Skip to content

Commit 78b4dfd

Browse files
jameszhu-amdalexdeucher
authored andcommitted
drm/amdgpu: increase hmm range get pages timeout
When application tries to allocate all system memory and cause memory to swap out. Needs more time for hmm_range_fault to validate the remaining page for allocation. To be safe, increase timeout value to 1 second for 64MB range. Signed-off-by: James Zhu <James.Zhu@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 65a618d commit 78b4dfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct mmu_interval_notifier *notifier,
190190
pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
191191
hmm_range->start, hmm_range->end);
192192

193-
/* Assuming 128MB takes maximum 1 second to fault page address */
194-
timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
193+
/* Assuming 64MB takes maximum 1 second to fault page address */
194+
timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
195195
timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
196196
timeout = jiffies + msecs_to_jiffies(timeout);
197197

0 commit comments

Comments
 (0)