Re: [PATCH v1 1/2] mm/migrate: remove MIGRATEPAGE_UNMAP
Zi Yan <[email protected]>
| Newsgroups | gmane.linux.kernel.aio.general,gmane.linux.kernel,gmane.linux.kernel.mm,gmane.linux.ports.ppc64.devel,gmane.linux.file-systems,gmane.comp.file-systems.btrfs |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > --- > include/linux/migrate.h | 1 - > mm/migrate.c | 40 ++++++++++++++++++++-------------------- > 2 files changed, 20 insertions(+), 21 deletions(-) > LGTM. Reviewed-by: Zi Yan <[email protected]> Best Regards, Yan, Zi -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>