Skip to contentSkip to conversation

Please backport 342981fff328 ("drm/amdgpu: drop retry loop in amdgpu_hmm_range_get_pages")

REGRESSION 6.18.y Applied Trace 2 participants 2 messages Nov 5 – Nov 6

Subsystems (2)
lore
Share & tools
lore

Trace

author
#0 lore raw

Hello,

please consider upstream commit 342981fff328 ("drm/amdgpu: drop retry loop in amdgpu_hmm_range_get_pages") for 6.18.y, 6.12.y and 6.6.y.

6.18.57, 6.12.114 and 6.6.160 took 962d684b5dc0 ("drm/amdgpu: fix amdgpu_hmm_range_get_pages", cherry-picked from c08972f55594). As the commit message of 342981fff328 explains, that change leaves the -EBUSY retry loop spinning for the full timeout. 7.0.13 and 7.1.1 took the follow-up. These three branches did not, and it carries no Fixes: or stable tag. It is not in 6.18.60, 6.12.115 or 6.6.161, and is not in the queue as of 2026-11-05.

The cost on a Radeon AI PRO R9700 with ROCm, a PyTorch speech model loaded from safetensors:

  6.18.56 and before:  model load 6-7.5 s
  6.18.57:             model load 507 s
  6.18.59:             model load 514 s
  7.3.0:               model load 16 s with a cold page cache, 8.4 s warm

With the same 679-character text and voice on the same image, it renders at 0.11x realtime on 6.18.59 and 0.73x on 7.3.0, against about 0.9x before 6.18.57.

The loading thread sits at 99% system time in kfd_ioctl -> svm_range_set_attr -> svm_range_validate_and_map -> amdgpu_hmm_range_get_pages -> hmm_range_fault.
https://github.com/ROCm/TheRock/issues/9257 reports the same stall on a gfx1100 card.

The patch does not apply cleanly. On 6.18.60 only the first hunk's context differs, as hmm_range is still a pointer there. 6.12.115 fails on the same hunk and 6.6.161 on both. I have not built or run a backport.

#regzbot introduced: v6.18.56..v6.18.57

Thanks,
Trace

maintainer Applied
#1 lore raw
Quoted 2 lines

please consider upstream commit 342981fff328 ("drm/amdgpu: drop retry loop in amdgpu_hmm_range_get_pages") for 6.18.y, 6.12.y and 6.6.y.

Queued for 6.18 and 6.12, thanks. 6.6 does not have the -EBUSY to -EAGAIN translation in amdgpu_hmm_range_get_pages() and the surrounding code differs, so it would need its own backport.

Signature · 2 lines
Thanks,
Sasha