Re: [PATCH v2 08/13] mm/migrate_device: fix ksmd oops on a migrated KSM page

From: Chris Down

Date: Sat Nov 14 2026 - 14:58:08 EST


Hi Lorenzo,

Lorenzo Stoakes (ARM) writes:
[ ljs: tweak commit message, comment, also refuse device coherent ]

Alistair's Reviewed-by on v1 came with the argument that KSM pages should
still be able to go to device coherent memory [1], which is the opposite of
what this does now, so it's probably worth checking that he's happy for it
to be carried over. Going by what ksmd does with zone device pages, the
change itself looks right to me.

I've tested the device private case. Without this the process hangs the
next time it touches one of the pages, and with it the migration is
refused and the pages stay merged.

[1] https://lore.kernel.org/r/avTu3LmscsttRVRp@nvdebian.thelocal

Reviewed-by: Chris Down <chris@xxxxxxxxxxxxxx>
Tested-by: Chris Down <chris@xxxxxxxxxxxxxx>

Chris