mbox series

[v2,0/6] mm: convert numa balancing functions to use a folio

Message ID 20230921074417.24004-1-wangkefeng.wang@huawei.com (mailing list archive)
Headers show
Series mm: convert numa balancing functions to use a folio | expand

Message

Kefeng Wang Sept. 21, 2023, 7:44 a.m. UTC
The do_numa_pages only handle non-compound page, and only PMD-mapped THP
is handled in do_huge_pmd_numa_page(), but large, PTE-mapped folio will
be supported, let's convert more numa balancing functions to use/take a
folio in preparation for that, no functional change intended for now.

v2:
- re-order the patch, drop 'extern' and wrap to 80 columns,
  suggested by Matthew
- rename vm_normal_pmd_folio to vm_normal_folio_pmd and fix cpupid,
  suggested by Huang, Ying

Kefeng Wang (6):
  mm: memory: add vm_normal_folio_pmd()
  mm: huge_memory: use a folio in do_huge_pmd_numa_page()
  mm: memory: use a folio in do_numa_page()
  mm: memory: make numa_migrate_prep() to take a folio
  mm: mempolicy: make mpol_misplaced() to take a folio
  sched/numa, mm: make numa migrate functions to take a folio

 include/linux/mempolicy.h            |  5 +--
 include/linux/mm.h                   |  2 ++
 include/linux/sched/numa_balancing.h |  6 ++--
 kernel/sched/fair.c                  | 12 +++----
 mm/huge_memory.c                     | 29 ++++++++--------
 mm/internal.h                        |  2 +-
 mm/memory.c                          | 49 ++++++++++++++++------------
 mm/mempolicy.c                       | 22 +++++++------
 8 files changed, 69 insertions(+), 58 deletions(-)