OSDN Git Service

drm/amdkfd: Don't trigger evictions unmapping dmabuf attachments
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 27 Apr 2023 02:07:43 +0000 (22:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:33:59 +0000 (09:33 -0400)
commitb9274387bc2a4cf54b02e039b6a0aef5dd5f2936
treef53572ba746a10ebc61f3fc17ea1423e71fd9cb9
parent738b3469f8e12ae72555ef4724bebe8167a93e29
drm/amdkfd: Don't trigger evictions unmapping dmabuf attachments

Don't move DMABuf attachments for PCIe P2P mappings to the SYSTEM domain
when unmapping. This avoids triggering eviction fences unnecessarily.
Instead do the move to SYSTEM and back to GTT when mapping these
attachments to ensure the SG table gets updated after evictions.

This may still trigger unnecessary evictions if user mode unmaps and
remaps the same BO. However, this is unlikely in real applications.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Eric Huang <jinhuieric.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c