drm/amdkfd: Use partial migrations/mapping for GPU/CPU page faults in SVM
authorXiaogang Chen <xiaogang.chen@amd.com>
Sat, 2 Dec 2023 05:38:12 +0000 (23:38 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2023 20:22:32 +0000 (15:22 -0500)
commita546a27684407942604bccdf3b62f0765c0f6399
tree52e69a9183b734256bcebb2f0b438369fe871789
parentfa745b554733ff0ed9ff918a0a53267300444c88
drm/amdkfd: Use partial migrations/mapping for GPU/CPU page faults in SVM

This patch implements partial migration/mapping for gpu/cpu page faults in SVM
according to migration granularity(default 2MB). A svm range may include pages
from both system ram and vram of one gpu now. These chagnes are expected to
improve migration performance and reduce mmu callback and TLB flush workloads.

Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
drivers/gpu/drm/amd/amdkfd/kfd_migrate.h
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h