[PATCH v1 1/2] mm/migrate: remove MIGRATEPAGE_UNMAP
Zi Yan
ziy at nvidia.com
Tue Aug 12 04:13:21 AEST 2025
On 11 Aug 2025, at 10:39, David Hildenbrand wrote:
> migrate_folio_unmap() is the only user of MIGRATEPAGE_UNMAP. We want to
> remove MIGRATEPAGE_* completely.
>
> It's rather weird to have a generic MIGRATEPAGE_UNMAP, documented to be
> returned from address-space callbacks, when it's only used for an
> internal helper.
>
> Let's start by having only a single "success" return value for
> migrate_folio_unmap() -- 0 -- by moving the "folio was already freed"
> check into the single caller.
>
> There is a remaining comment for PG_isolated, which we renamed to
> PG_movable_ops_isolated recently and forgot to update.
>
> While we might still run into that case with zsmalloc, it's something we
> want to get rid of soon. So let's just focus that optimization on real
> folios only for now by excluding movable_ops pages. Note that concurrent
> freeing can happen at any time and this "already freed" check is not
> relevant for correctness.
>
> Signed-off-by: David Hildenbrand <david at redhat.com>
> ---
> include/linux/migrate.h | 1 -
> mm/migrate.c | 40 ++++++++++++++++++++--------------------
> 2 files changed, 20 insertions(+), 21 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy at nvidia.com>
Best Regards,
Yan, Zi
More information about the Linuxppc-dev
mailing list