]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdkfd: Fix partial migrate issue
authorEmily Deng <Emily.Deng@amd.com>
Tue, 31 Dec 2024 08:13:14 +0000 (16:13 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Jan 2025 14:52:08 +0000 (09:52 -0500)
commitb5f022fe8ec58540e29a32e328f89b7298f70313
tree0d511eb0b0e8304efa3a41e08d3b7d5c1fbb0062
parent19b7f7c721f62b899017a633277becce57c0a070
drm/amdkfd: Fix partial migrate issue

For partial migrate from ram to vram, the migrate->cpages is not
equal to migrate->npages, should use migrate->npages to check all needed
migrate pages which could be copied or not.

And only need to set those pages could be migrated to migrate->dst[i], or
the migrate_vma_pages will migrate the wrong pages based on the migrate->dst[i].

v2:
Add mpages to break the loop earlier.

v3:
Uses MIGRATE_PFN_MIGRATE to identify whether page could be migrated.

v4:
Correct the error part.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Philip Yang<Philip.Yang@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c