Re: [PATCH v1 1/2] mm/migrate: remove MIGRATEPAGE_UNMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  include/linux/migrate.h |  1 -
>  mm/migrate.c            | 40 ++++++++++++++++++++--------------------
>  2 files changed, 20 insertions(+), 21 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

Best Regards,
Yan, Zi




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux