mm-migration-remove-pagemovable.patch removed from -mm tree
The quilt patch titled
Subject: mm/migration: remove PageMovable()
has been removed from the -mm tree. Its filename was
mm-migration-remove-pagemovable.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: David Hildenbrand <[email protected]>
Subject: mm/migration: remove PageMovable()
Date: Fri, 4 Jul 2025 12:25:09 +0200
Previously, if __ClearPageMovable() were invoked on a page, this would cause __PageMovable() to return false, but due to the continued existence of page movable ops, PageMovable() would have returned true.
With __ClearPageMovable() gone, the two are exactly equivalent.
So we can replace PageMovable() checks by __PageMovable(). In fact, __PageMovable() cannot change until a page is freed, so we can turn some PageMovable() into sanity checks for __PageMovable().
---
include/linux/migrate.h | 2 -- mm/compaction.c | 15 --------------- mm/migrate.c | 18 ++++++++++-------- 3 files changed, 10 insertions(+), 25 deletions(-)
include/linux/migrate.h renamed from include/linux/migrate.h~mm-migration-remove-pagemovable +0 -2
@@ -104,10 +104,8 @@ static inline int migrate_huge_page_move#endif /* CONFIG_MIGRATION */ #ifdef CONFIG_COMPACTION -bool PageMovable (struct page *page);void __SetPageMovable (struct page *page,const struct movable_operations *ops);#else -static inline bool PageMovable (struct page *page) {return false; }static inline void __SetPageMovable (struct page *page,const struct movable_operations *ops) {
mm/compaction.c renamed from mm/compaction.c~mm-migration-remove-pagemovable +0 -15
@@ -114,21 +114,6 @@ static unsigned long release_free_list(s }#ifdef CONFIG_COMPACTION -bool PageMovable (struct page *page) -{ -const struct movable_operations *mops; - -VM_BUG_ON_PAGE (!PageLocked (page), page); -if (!__PageMovable (page)) -return false; - - mops =page_movable_ops (page); -if (mops) -return true; - -return false; -} -void __SetPageMovable (struct page *page,const struct movable_operations *mops) {VM_BUG_ON_PAGE (!PageLocked (page), page);
mm/migrate.c renamed from mm/migrate.c~mm-migration-remove-pagemovable +10 -8
@@ -87,9 +87,12 @@ bool isolate_movable_ops_page(struct pag goto out;/* -* Check movable flag before taking the page lock because +* Check for movable_ops pages before taking the page lock because * we use non-atomic bitops on newly allocated page flags so * unconditionally grabbing the lock ruins page's owner side. +* +* Note that once a page has movable_ops, it will stay that way +* until the page was freed. */ if (unlikely (!__PageMovable (page))) goto out_putfolio;
@@ -108,7 +111,8 @@ bool isolate_movable_ops_page(struct pagif (unlikely (!folio_trylock (folio))) goto out_putfolio; -if (!PageMovable (page) ||PageIsolated (page)) +VM_WARN_ON_ONCE_PAGE (!__PageMovable (page), page); +if (PageIsolated (page)) goto out_no_isolated; mops =page_movable_ops (page);
@@ -149,11 +153,10 @@ static void putback_movable_ops_page(str*/ struct folio *folio =page_folio (page); +VM_WARN_ON_ONCE_PAGE (!__PageMovable (page), page);VM_WARN_ON_ONCE_PAGE (!PageIsolated (page), page);folio_lock (folio); -/* If the page was released by it's owner, there is nothing to do. */ -if (PageMovable (page)) -page_movable_ops (page)->putback_page (page); +page_movable_ops (page)->putback_page (page);ClearPageIsolated (page);folio_unlock (folio);folio_put (folio);
@@ -191,10 +194,9 @@ static int migrate_movable_ops_page(stru {int rc =MIGRATEPAGE_SUCCESS ; +VM_WARN_ON_ONCE_PAGE (!__PageMovable (src), src);VM_WARN_ON_ONCE_PAGE (!PageIsolated (src), src); -/* If the page was released by it's owner, there is nothing to do. */ -if (PageMovable (src)) - rc =page_movable_ops (src)->migrate_page (dst, src, mode); + rc =page_movable_ops (src)->migrate_page (dst, src, mode);if (rc ==MIGRATEPAGE_SUCCESS )ClearPageIsolated (src);return rc;
_
Patches currently in -mm which might be from [email protected] are
mm-convert-fpb_ignore_-into-fpb_respect_.patch mm-smaller-folio_pte_batch-improvements.patch mm-split-folio_pte_batch-into-folio_pte_batch-and-folio_pte_batch_flags.patch mm-remove-boolean-output-parameters-from-folio_pte_batch_ext.patch mm-memory-introduce-is_huge_zero_pfn-and-use-it-in-vm_normal_page_pmd.patch