Re: [PATCH v16 09/12] mm: enable device page migration from HMM pagewalk

From: Balbir Singh

Date: Wed Oct 21 2026 - 02:26:58 EST


On 10/21/26 5:05 PM, mpenttil@xxxxxxxxxx wrote:
> From: Mika Penttilä <mpenttil@xxxxxxxxxx>
>
> HMM pagewalk has now the machinery to do the first phase of
> device page migration, collecting the pfns and installing
> migration ptes.
>
> Enable migration in hmm_range_fault(), and change migrate_vma_setup()
> to use HMM pagewalk path. Two new flags, MIGRATE_VMA_FAULT and
> MIGRATE_VMA_WRITE are introduced for migrate_vma_setup(),
> to request for faulting missing pages, and requesting write
> access.
>
> Also, the migrate_vma_collect*() based paths are now unused,
> so delete them.
>
> Cc: David Hildenbrand <david@xxxxxxxxxx>
> Cc: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Cc: Leon Romanovsky <leonro@xxxxxxxxxx>
> Cc: Alistair Popple <apopple@xxxxxxxxxx>
> Cc: Balbir Singh <balbirs@xxxxxxxxxx>
> Cc: Zi Yan <ziy@xxxxxxxxxx>
> Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
> Suggested-by: Alistair Popple <apopple@xxxxxxxxxx>
> Signed-off-by: Mika Penttilä <mpenttil@xxxxxxxxxx>
> ---
> include/linux/migrate.h | 10 +-
> mm/hmm.c | 33 ++-
> mm/migrate_device.c | 562 ++++------------------------------------
> 3 files changed, 83 insertions(+), 522 deletions(-)
>
I got a conflict applying this patch on the latest mm-everything with
mm: avoid use of VMA_SPECIAL_FLAGS in migrate_vma_setup(), quite a simple fixup

Balbir