[merged mm-stable] mm-migrate-rename-page-to-folio-leftovers.patch removed from -mm tree
Andrew Morton <[email protected]> Tue, 28 Jul 2026 21:13:50 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: mm/migrate: rename page to folio leftovers
has been removed from the -mm tree. Its filename was
mm-migrate-rename-page-to-folio-leftovers.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: Shivank Garg <[email protected]>
Subject: mm/migrate: rename page to folio leftovers
Date: Wed, 1 Jul 2026 05:17:20 +0000
Patch series "mm/migrate: preparatory cleanups for batch copy and
offload", v2.
This is a small set of mm/migrate cleanups split out of the batch-copy and
offload RFC [1], so they can be reviewed and merged independently ahead of
that larger series.
No functional change intended.
This patch (of 3):
Rename migrate_folio_undo_src()'s page_was_mapped parameter to was_mapped,
unmap_and_move_huge_page() to unmap_and_move_hugetlb_folio(), its
page_was_mapped variable to was_mapped and fix stale "page" wording in its
comments.
Also fix migrate_folio() kerneldoc to say "folio" instead of "page".
Link: https://lore.kernel.org/[email protected]
Link: https://lore.kernel.org/[email protected]
Link: https://lore.kernel.org/all/[email protected] [1]
Signed-off-by: Shivank Garg <[email protected]>
Suggested-by: Dev Jain <[email protected]>
Suggested-by: David Hildenbrand (Arm) <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: SJ Park <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: Byungchul Park <[email protected]>
Cc: Gregory Price <[email protected]>
Cc: "Huang, Ying" <[email protected]>
Cc: Joshua Hahn <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Rakie Kim <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
mm/migrate.c | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
--- a/mm/migrate.c~mm-migrate-rename-page-to-folio-leftovers
+++ a/mm/migrate.c
@@ -884,7 +884,7 @@ static int __migrate_folio(struct addres
* @mapping: The address_space containing the folio.
* @dst: The folio to migrate the data to.
* @src: The folio containing the current data.
- * @mode: How to migrate the page.
+ * @mode: How to migrate the folio.
*
* Common logic to directly migrate a single LRU folio suitable for
* folios that do not have private data.
@@ -1157,13 +1157,10 @@ static void __migrate_folio_extract(stru
}
/* Restore the source folio to the original state upon failure */
-static void migrate_folio_undo_src(struct folio *src,
- int page_was_mapped,
- struct anon_vma *anon_vma,
- bool locked,
- struct list_head *ret)
+static void migrate_folio_undo_src(struct folio *src, int was_mapped,
+ struct anon_vma *anon_vma, bool locked, struct list_head *ret)
{
- if (page_was_mapped)
+ if (was_mapped)
remove_migration_ptes(src, src, 0);
/* Drop an anon_vma reference if we took one */
if (anon_vma)
@@ -1449,7 +1446,8 @@ out:
}
/*
- * Counterpart of unmap_and_move_page() for hugepage migration.
+ * Counterpart of migrate_folio_unmap() and migrate_folio_move() for hugetlb
+ * folio migration.
*
* This function doesn't wait the completion of hugepage I/O
* because there is no race between I/O and migration for hugepage.
@@ -1466,20 +1464,20 @@ out:
* because then pte is replaced with migration swap entry and direct I/O code
* will wait in the page fault for migration to complete.
*/
-static int unmap_and_move_huge_page(new_folio_t get_new_folio,
+static int unmap_and_move_hugetlb_folio(new_folio_t get_new_folio,
free_folio_t put_new_folio, unsigned long private,
struct folio *src, int force, enum migrate_mode mode,
enum migrate_reason reason, struct list_head *ret)
{
struct folio *dst;
int rc = -EAGAIN;
- int page_was_mapped = 0;
+ int was_mapped = 0;
struct anon_vma *anon_vma = NULL;
struct address_space *mapping = NULL;
enum ttu_flags ttu = 0;
if (folio_ref_count(src) == 1) {
- /* page was freed from under us. So we are done. */
+ /* folio was freed from under us. So we are done. */
folio_putback_hugetlb(src);
return 0;
}
@@ -1501,8 +1499,8 @@ static int unmap_and_move_huge_page(new_
}
/*
- * Check for pages which are in the process of being freed. Without
- * folio_mapping() set, hugetlbfs specific move page routine will not
+ * Check for folios which are in the process of being freed. Without
+ * folio_mapping() set, hugetlbfs specific move folio routine will not
* be called and we could leak usage counts for subpools.
*/
if (hugetlb_folio_subpool(src) && !folio_mapping(src)) {
@@ -1532,13 +1530,13 @@ static int unmap_and_move_huge_page(new_
}
try_to_migrate(src, ttu);
- page_was_mapped = 1;
+ was_mapped = 1;
}
if (!folio_mapped(src))
rc = move_to_new_folio(dst, src, mode);
- if (page_was_mapped)
+ if (was_mapped)
remove_migration_ptes(src, !rc ? dst : src, ttu);
if (ttu & TTU_RMAP_LOCKED)
@@ -1663,10 +1661,10 @@ static int migrate_hugetlbs(struct list_
continue;
}
- rc = unmap_and_move_huge_page(get_new_folio,
- put_new_folio, private,
- folio, pass > 2, mode,
- reason, ret_folios);
+ rc = unmap_and_move_hugetlb_folio(get_new_folio,
+ put_new_folio, private,
+ folio, pass > 2, mode,
+ reason, ret_folios);
/*
* The rules are:
* 0: hugetlb folio will be put back
_
Patches currently in -mm which might be from [email protected] are