[PATCH v2 0/2] drm/amdkfd: Unmap SVM range from GPU set to no-access
Philip Yang <[email protected]> Mon, 27 Jul 2026 15:39:28 -0400
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
Setting KFD_IOCTL_SVM_ATTR_NO_ACCESS on a GPU used to do nothing: the range stayed mapped, so the MMU notifier kept evicting GPU queues on CPU page faults even though the app wanted no access from that GPU. Patch 1 adds a helper to update the fault checkpoint timestamp and makes the timestamp atomic so the page fault handler can read it locklessly. Patch 2 unmaps the range from each GPU set to no-access. Once no GPU maps the range, the MMU notifier skips queue eviction. It bumps the checkpoint timestamp so retry faults queued before the unmap are dropped. Philip Yang (2): drm/amdkfd: Add helper svm_range_update_checkpoint_timestamp drm/amdkfd: Unmap svm range from GPU set to no-access 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 | 190 +++++++++++++++---------- drivers/gpu/drm/amd/amdkfd/kfd_svm.h | 7 +- 4 files changed, 125 insertions(+), 79 deletions(-) -- 2.50.1