]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/migrate: Add migrate_device_pfns
authorMatthew Brost <matthew.brost@intel.com>
Thu, 6 Mar 2025 01:26:27 +0000 (17:26 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 6 Mar 2025 19:35:23 +0000 (11:35 -0800)
commita14fa8ec9d811c1cef902345b58294b589655b41
tree6dd2ee0b6547f97a7d453cd1a2e6407f87c9d9ad
parent1d724a2f1b2c3f0cba4975784a808482e0631adf
mm/migrate: Add migrate_device_pfns

Add migrate_device_pfns which prepares an array of pre-populated device
pages for migration. This is needed for eviction of known set of
non-contiguous devices pages to cpu pages which is a common case for SVM
in DRM drivers using TTM.

v2:
 - s/migrate_device_vma_range/migrate_device_prepopulated_range
 - Drop extra mmu invalidation (Vetter)
v3:
 - s/migrate_device_prepopulated_range/migrate_device_pfns (Alistar)
 - Use helper to lock device pages (Alistar)
 - Update commit message with why this is required (Alistar)

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250306012657.3505757-3-matthew.brost@intel.com
include/linux/migrate.h
mm/migrate_device.c