Re: [PATCH v8 0/5] Migrate on fault for device pages

From: Andrew Morton

Date: Fri Apr 24 2026 - 12:23:48 EST


On Tue, 14 Apr 2026 07:12:21 +0300 mpenttil@xxxxxxxxxx wrote:

> From: Mika Penttilä <mpenttil@xxxxxxxxxx>
>
> Currently, the way device page faulting and migration works
> is not optimal, if you want to do both fault handling and
> migration at once.
>
> Being able to migrate not present pages (or pages mapped with incorrect
> permissions, eg. COW) to the GPU requires doing either of the
> following sequences:
>
> ...
>

Via which tree would it be best to upstream this?

> include/linux/hmm.h | 19 +-
> include/linux/migrate.h | 26 +-
> lib/test_hmm.c | 101 ++-
> lib/test_hmm_uapi.h | 19 +-
> mm/Kconfig | 2 +
> mm/hmm.c | 821 +++++++++++++++++++++++--
> mm/migrate_device.c | 589 +++---------------
> tools/testing/selftests/mm/hmm-tests.c | 54 ++
> 8 files changed, 1053 insertions(+), 578 deletions(-)

Looks like mm.git.

It might be more useful to add it to a DRM tree if there's ongoing
development against this. But please no upstreaming without good
review!

Anyway, this is a bit dated and Sashiko AI review wasn't able to apply
the patches. Nor was it able to apply v7 or v6. So please refresh,
retest, resend?