OSDN Git Service

drm/amdkfd: Add heavy-weight TLB flush after unmapping
authorEric Huang <jinhuieric.huang@amd.com>
Tue, 1 Jun 2021 22:26:07 +0000 (18:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Jun 2021 16:40:00 +0000 (12:40 -0400)
It is a part of memory mapping optimization.

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

index e864224..e88f638 100644 (file)
@@ -1563,6 +1563,7 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
                               i, args->n_devices);
                        goto unmap_memory_from_gpu_failed;
                }
+               kfd_flush_tlb(peer_pdd, TLB_FLUSH_HEAVYWEIGHT);
                args->n_success = i+1;
        }
        kfree(devices_arr);