]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amdkfd: Remove arbitrary timeout for hmm_range_fault
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 30 Apr 2024 17:51:51 +0000 (13:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 May 2024 19:44:02 +0000 (15:44 -0400)
commit9095e5544061b16d1b331aca3f32c76cbd656d72
tree1fc184dd13bc267638a4954ef3292ba7c144d77d
parent10f624ef239bd136cdcc5bbc626157a57b938a31
drm/amdkfd: Remove arbitrary timeout for hmm_range_fault

On system with khugepaged enabled and user cases with THP buffer, the
hmm_range_fault may takes > 15 seconds to return -EBUSY, the arbitrary
timeout value is not accurate, cause memory allocation failure.

Remove the arbitrary timeout value, return EAGAIN to application if
hmm_range_fault return EBUSY, then userspace libdrm and Thunk will call
ioctl again.

Change EAGAIN to debug message as this is not error.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c