When an application sets KFD_IOCTL_SVM_ATTR_NO_ACCESS on a range, the previous code did nothing — it did not unmap the range from GPUs. As a result, the MMU notifier still evicted GPU queues on CPU page faults for that range, even though the app already indicated no GPU access is needed.
Patch 1 unmaps the range from all GPUs once all mapped GPUs are set to no-access, so the MMU notifier skips queue eviction for it. Patch 2 drains retry faults that were already queued in the IH ring before the no-access unmap, so they do not generate page fault. Philip Yang (2): drm/amdkfd: Unmap svm range when all GPUs set to no-access drm/amdkfd: Drain retry faults before SVM range no-access unmap drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 5 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 188 +++++++++++++++---------- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 7 +- 4 files changed, 123 insertions(+), 79 deletions(-) -- 2.50.1
