Skip to content

mm: migrate: more folio conversion and unification

Kefeng Wang linux-mm lkml 3 versions – Applied

Status from this message: [merged mm-stable] mm-migrate-use-a-folio-in-add_page_for_migration.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 0 repliesApplied 8/8
  2. v28 patches 14 repliesSuperseded
  3. v14 patches 27 repliesSuperseded

Changes in v3 from the cover letter

- update changelog of patch1
- use folio_estimated_sharers and comment it in migrate_misplaced_folio()
- collect RB/ACK
- rebased on 6.6-rc1

Patches in v3 All 8 applied

#Subject and filesSizeRepliesApplied
1/8mm: migrate: remove PageTransHuge check in numamigrate_isolate_page()mm/migrate.c+0 -20 repliesApplied
2/8mm: migrate: remove THP mapcount check in numamigrate_isolate_page()mm/migrate.c+0 -40 repliesApplied
3/8mm: migrate: convert numamigrate_isolate_page() to numamigrate_isolate_folio()mm/migrate.c+10 -100 repliesApplied
4/8mm: migrate: convert migrate_misplaced_page() to migrate_misplaced_folio()include/linux/migrate.h mm/huge_memory.c mm/memory.c +1 more+25 -220 repliesApplied
5/8mm: migrate: use __folio_test_movable()mm/migrate.c+7 -70 repliesApplied
6/8mm: migrate: use a folio in add_page_for_migration()mm/migrate.c+19 -210 repliesApplied
7/8mm: migrate: remove PageHead() check for HugeTLB in add_page_for_migration()mm/migrate.c+2 -40 repliesApplied
8/8mm: migrate: remove isolated variable in add_page_for_migration()mm/migrate.c+4 -70 repliesApplied

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchHuang, YingZi YanMatthew Wilcox (Oracle)David Hildenbrand
1/8
2/8R-b
3/8R-b
4/8R-b
5/8R-b R-b R-b
6/8R-b
7/8A-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/8] mm: migrate: more folio conversion and unification

Convert more migrate functions to use a folio, it is also a preparation for large folio migration support when numa balance.

The patch 1~2 remove unexpected specific assert for PageTransHuge page.

The Patch 3~6 convert several more migration functions to use folio.
1) add_page_for_migration() used by move_pages
2) migrate_misplaced_page()/numamigrate_isolate_page() used by numa balance

The patch 7 remove PageHead() check to make hugetlb to migrate the
entire hugetlb page instead of -EACCES errno return when passed the address of a tail page.

The patch 8 cleanup to unify and simplify code a bit in
add_page_for_migration()

Thanks for all comments and suggestions from Matthew, Hugh, Zi, Mike, Huang.

v3:
- update changelog of patch1
- use folio_estimated_sharers and comment it in migrate_misplaced_folio()
- collect RB/ACK
- rebased on 6.6-rc1

v2:
- keep page_mapcount() check and remove specific assert for PageTransHuge page.
- separate patch7 to migrate the entire hugetlb page if a tail page passed, which unified the behavior between HUGETLB and THP when move_page().

Kefeng Wang (8):
mm: migrate: remove PageTransHuge check in numamigrate_isolate_page()
mm: migrate: remove THP mapcount check in numamigrate_isolate_page()
mm: migrate: convert numamigrate_isolate_page() to
numamigrate_isolate_folio()
mm: migrate: convert migrate_misplaced_page() to
migrate_misplaced_folio()
mm: migrate: use __folio_test_movable()
mm: migrate: use a folio in add_page_for_migration()
mm: migrate: remove PageHead() check for HugeTLB in
add_page_for_migration()
mm: migrate: remove isolated variable in add_page_for_migration()

 include/linux/migrate.h |   4 +-
 mm/huge_memory.c        |   2 +-
 mm/memory.c             |   2 +-
 mm/migrate.c            | 126 ++++++++++++++++++----------------------
 4 files changed, 62 insertions(+), 72 deletions(-)
Signature · 1 line
2.27.0