mm-remove-__folio_test_movable.patch removed from -mm tree
The quilt patch titled
Subject: mm: remove __folio_test_movable()
has been removed from the -mm tree. Its filename was
mm-remove-__folio_test_movable.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: remove __folio_test_movable()
Date: Fri, 4 Jul 2025 12:25:12 +0200
Convert to page_has_movable_ops(). While at it, cleanup relevant code a bit.
The data_race() in migrate_folio_unmap() is questionable: we already hold a page reference, and concurrent modifications can no longer happen (iow:__ClearPageMovable() no longer exists). Drop it for now, we'll rework page_has_movable_ops() soon either way to no longer rely on page->mapping.
Wherever we cast from folio to page now is a clear sign that this code has to be decoupled.
---
include/linux/page-flags.h | 6 ---- mm/migrate.c | 43 ++++++++++------------------------- mm/vmscan.c | 6 +++- 3 files changed, 17 insertions(+), 38 deletions(-)
include/linux/page-flags.h renamed from include/linux/page-flags.h~mm-remove-__folio_test_movable +0 -6
@@ -744,12 +744,6 @@ static __always_inline bool PageAnon(conreturn folio_test_anon (page_folio (page)); } -static __always_inline bool __folio_test_movable(const struct folio *folio) -{ -return ((unsigned long )folio->mapping &PAGE_MAPPING_FLAGS ) == -PAGE_MAPPING_MOVABLE ; -} - static __always_inline bool page_has_movable_ops(const struct page *page) { return ((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) ==
mm/migrate.c renamed from mm/migrate.c~mm-remove-__folio_test_movable +13 -30
84 lines not on this page · raw message
mm/vmscan.c renamed from mm/vmscan.c~mm-remove-__folio_test_movable +4 -2
@@ -1651,9 +1651,11 @@ unsigned int reclaim_clean_pages_from_liunsigned int noreclaim_flag;list_for_each_entry_safe (folio, next, folio_list, lru) { +/* TODO: these pages should not even appear in this list. */ +if (page_has_movable_ops (&folio->page)) +continue ;if (!folio_test_hugetlb (folio) &&folio_is_file_lru (folio) && - !folio_test_dirty (folio) && !__folio_test_movable (folio) && - !folio_test_unevictable (folio)) { + !folio_test_dirty (folio) && !folio_test_unevictable (folio)) {folio_clear_active (folio);list_move (&folio->lru, &clean_folios); }
_
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