summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorJames Zhu <James.Zhu@amd.com>2023-12-08 17:41:25 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-12-15 12:16:34 -0500
commit78b4dfd35999e22b4f589a3e070c4aa5f07ce3a2 (patch)
treefc2feb9a7a94a0f14d447e5c14bca7c3da37830d /drivers/gpu/drm/amd
parent65a618dd73216e111baab144a837f842dbb6a738 (diff)
downloadlinux-stable-78b4dfd35999e22b4f589a3e070c4aa5f07ce3a2.tar.gz
linux-stable-78b4dfd35999e22b4f589a3e070c4aa5f07ce3a2.tar.bz2
linux-stable-78b4dfd35999e22b4f589a3e070c4aa5f07ce3a2.zip
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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
index 081267161d40..b24eb5821fd1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
@@ -190,8 +190,8 @@ int amdgpu_hmm_range_get_pages(struct mmu_interval_notifier *notifier,
pr_debug("hmm range: start = 0x%lx, end = 0x%lx",
hmm_range->start, hmm_range->end);
- /* Assuming 128MB takes maximum 1 second to fault page address */
- timeout = max((hmm_range->end - hmm_range->start) >> 27, 1UL);
+ /* Assuming 64MB takes maximum 1 second to fault page address */
+ timeout = max((hmm_range->end - hmm_range->start) >> 26, 1UL);
timeout *= HMM_RANGE_DEFAULT_TIMEOUT;
timeout = jiffies + msecs_to_jiffies(timeout);