mbox series

[v4,00/11] clean-up the migration target allocation functions

Message ID 1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com (mailing list archive)
Headers show
Series clean-up the migration target allocation functions | expand

Message

Joonsoo Kim July 7, 2020, 7:44 a.m. UTC
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>

This patchset clean-up the migration target allocation functions.

* Changes on v4
- use full gfp_mask
- use memalloc_nocma_{save,restore} to exclude CMA memory
- separate __GFP_RECLAIM handling for THP allocation
- remove more wrapper functions

* Changes on v3
- As Vlastimil suggested, do not introduce alloc_control for hugetlb functions
- do not change the signature of migrate_pages()
- rename alloc_control to migration_target_control

* Changes on v2
- add acked-by tags
- fix missing compound_head() call for patch #3
- remove thisnode field on alloc_control and use __GFP_THISNODE directly
- fix missing __gfp_mask setup for patch
"mm/hugetlb: do not modify user provided gfp_mask"

* Cover-letter

Contributions of this patchset are:
1. unify two hugetlb alloc functions. As a result, one is remained.
2. make one external hugetlb alloc function to internal one.
3. unify three functions for migration target allocation.

The patchset is based on next-20200703 + revert v3 of this patchset.

git revert ddc017c727e429488cccd401a7794c8152e50a5b~1..583c2617fd3244fff79ba3b445964884c5cd7780

The patchset is available on:

https://github.com/JoonsooKim/linux/tree/cleanup-migration-target-allocation-v4.00-next-20200703

Thanks.

Joonsoo Kim (11):
  mm/page_isolation: prefer the node of the source page
  mm/migrate: move migration helper from .h to .c
  mm/hugetlb: unify migration callbacks
  mm/hugetlb: make hugetlb migration callback CMA aware
  mm/migrate: clear __GFP_RECLAIM for THP allocation for migration
  mm/migrate: make a standard migration target allocation function
  mm/gup: use a standard migration target allocation callback
  mm/mempolicy: use a standard migration target allocation callback
  mm/page_alloc: remove a wrapper for alloc_migration_target()
  mm/memory-failure: remove a wrapper for alloc_migration_target()
  mm/memory_hotplug: remove a wrapper for alloc_migration_target()

 include/linux/hugetlb.h | 28 ++++++++++++-------
 include/linux/migrate.h | 34 +++++------------------
 mm/gup.c                | 60 +++++------------------------------------
 mm/hugetlb.c            | 71 +++++++++++++++++++------------------------------
 mm/internal.h           |  9 ++++++-
 mm/memory-failure.c     | 15 +++++------
 mm/memory_hotplug.c     | 42 +++++++++++++++--------------
 mm/mempolicy.c          | 29 +++++---------------
 mm/migrate.c            | 59 ++++++++++++++++++++++++++++++++++++++--
 mm/page_alloc.c         |  8 ++++--
 mm/page_isolation.c     |  5 ----
 11 files changed, 163 insertions(+), 197 deletions(-)