mbox series

[v2,00/26] Folio patches for 5.19

Message ID 20220504182857.4013401-1-willy@infradead.org (mailing list archive)
Headers show
Series Folio patches for 5.19 | expand

Message

Matthew Wilcox May 4, 2022, 6:28 p.m. UTC
Sorry for the bugginess that slipped through my testing in v1.
I think this series addresses all of the reported problems.

v2:
 - Add "alpha: Fix alloc_zeroed_user_highpage_movable()"
 - Rework the shmem_alloc_page() -> shmem_alloc_folio() conversion to
   be less disruptive (and buggy)
 - Use folio_test_pmd_mappable() instead of folio_test_large() to
   fix the !THP builds
 - Initialise 'folio' to NULL in shmem_swapin_folio to fix the error
   case
 - Avoid using HPAGE_PMD_NR in shmem_getpage_gfp()
 - Remove BUILD_BUG from can_split_folio()
 - Add the mm parts needed to convert ->migratepage to migrate_folio
   for fs in the next merge window
v1:
 - Finish the conversion from alloc_pages_vma() to vma_alloc_folio()
 - Finish converting shrink_page_list() to folios
 - Start converting shmem from pages to folios (alas, not finished,
   I have simply run out of time with all the debugging/fixing needed
   for 5.18)

Matthew Wilcox (Oracle) (26):
  shmem: Convert shmem_alloc_hugepage() to use vma_alloc_folio()
  mm/huge_memory: Convert do_huge_pmd_anonymous_page() to use 
    vma_alloc_folio()
  alpha: Fix alloc_zeroed_user_highpage_movable()
  mm: Remove alloc_pages_vma()
  vmscan: Use folio_mapped() in shrink_page_list()
  vmscan: Convert the writeback handling in shrink_page_list() to folios
  swap: Turn get_swap_page() into folio_alloc_swap()
  swap: Convert add_to_swap() to take a folio
  vmscan: Convert dirty page handling to folios
  vmscan: Convert page buffer handling to use folios
  vmscan: Convert lazy freeing to folios
  vmscan: Move initialisation of mapping down
  vmscan: Convert the activate_locked portion of shrink_page_list to
    folios
  mm: Allow can_split_folio() to be called when THP are disabled
  vmscan: Remove remaining uses of page in shrink_page_list
  mm/shmem: Use a folio in shmem_unused_huge_shrink
  mm/swap: Add folio_throttle_swaprate
  mm/shmem: Convert shmem_add_to_page_cache to take a folio
  mm/shmem: Turn shmem_should_replace_page into
    shmem_should_replace_folio
  mm/shmem: Add shmem_alloc_folio()
  mm/shmem: Convert shmem_alloc_and_acct_page to use a folio
  mm/shmem: Convert shmem_getpage_gfp to use a folio
  mm/shmem: Convert shmem_swapin_page() to shmem_swapin_folio()
  mm: Add folio_mapping_flags()
  mm: Add folio_test_movable()
  mm/migrate: Convert move_to_new_page() into move_to_new_folio()

 arch/alpha/include/asm/page.h    |   2 +-
 arch/arm64/include/asm/pgtable.h |   6 +-
 include/linux/gfp.h              |  18 +-
 include/linux/huge_mm.h          |   1 -
 include/linux/memcontrol.h       |  14 ++
 include/linux/migrate.h          |   5 +
 include/linux/page-flags.h       |   5 +
 include/linux/pgtable.h          |   2 +-
 include/linux/swap.h             |  23 ++-
 mm/huge_memory.c                 |   9 +-
 mm/memcontrol.c                  |  16 +-
 mm/mempolicy.c                   |  51 +++--
 mm/migrate.c                     |  58 +++---
 mm/shmem.c                       | 320 +++++++++++++++---------------
 mm/swap_slots.c                  |  14 +-
 mm/swap_state.c                  |  48 ++---
 mm/swapfile.c                    |  17 +-
 mm/vmscan.c                      | 326 ++++++++++++++++---------------
 18 files changed, 482 insertions(+), 453 deletions(-)