My focus this round has been on shmem. I believe it is now fully converted to folios. Of course, shmem interacts with a lot of the swap cache and other parts of the kernel, so there are patches all over the MM. This patch series survives a round of xfstests on tmpfs, which is nice, but hardly an exhaustive test. Hugh was nice enough to run a round of tests on it and found a bug which is fixed in this edition. Also new in this edition is the addition of mm: Convert lock_page_or_retry() to folio_lock_or_retry() which I inadvertently left out of the first round of patches. I adjusted the shmem_replace_page() patch to apply on top of 76d36dea0269. Matthew Wilcox (Oracle) (57): mm/vmscan: Fix a lot of comments mm: Add the first tail page to struct folio mm: Reimplement folio_order() and folio_nr_pages() mm: Add split_folio() mm: Add folio_add_lru_vma() shmem: Convert shmem_writepage() to use a folio throughout shmem: Convert shmem_delete_from_page_cache() to take a folio shmem: Convert shmem_replace_page() to use folios throughout mm/swapfile: Remove page_swapcount() mm/swapfile: Convert try_to_free_swap() to folio_free_swap() mm/swap: Convert __read_swap_cache_async() to use a folio mm/swap: Convert add_to_swap_cache() to take a folio mm/swap: Convert put_swap_page() to put_swap_folio() mm: Convert do_swap_page() to use a folio mm: Convert do_swap_page()'s swapcache variable to a folio memcg: Convert mem_cgroup_swapin_charge_page() to mem_cgroup_swapin_charge_folio() shmem: Convert shmem_mfill_atomic_pte() to use a folio shmem: Convert shmem_replace_page() to shmem_replace_folio() swap: Add swap_cache_get_folio() shmem: Eliminate struct page from shmem_swapin_folio() shmem: Convert shmem_getpage_gfp() to shmem_get_folio_gfp() shmem: Convert shmem_fault() to use shmem_get_folio_gfp() shmem: Convert shmem_read_mapping_page_gfp() to use shmem_get_folio_gfp() shmem: Add shmem_get_folio() shmem: Convert shmem_get_partial_folio() to use shmem_get_folio() shmem: Convert shmem_write_begin() to use shmem_get_folio() shmem: Convert shmem_file_read_iter() to use shmem_get_folio() shmem: Convert shmem_fallocate() to use a folio shmem: Convert shmem_symlink() to use a folio shmem: Convert shmem_get_link() to use a folio khugepaged: Call shmem_get_folio() userfaultfd: Convert mcontinue_atomic_pte() to use a folio shmem: Remove shmem_getpage() swapfile: Convert try_to_unuse() to use a folio swapfile: Convert __try_to_reclaim_swap() to use a folio swapfile: Convert unuse_pte_range() to use a folio mm: Convert do_swap_page() to use swap_cache_get_folio() mm: Remove lookup_swap_cache() swap_state: Convert free_swap_cache() to use a folio swap: Convert swap_writepage() to use a folio mm: Convert do_wp_page() to use a folio huge_memory: Convert do_huge_pmd_wp_page() to use a folio madvise: Convert madvise_free_pte_range() to use a folio uprobes: Use folios more widely in __replace_page() ksm: Use a folio in replace_page() mm: Convert do_swap_page() to use folio_free_swap() memcg: Convert mem_cgroup_swap_full() to take a folio mm: Remove try_to_free_swap() rmap: Convert page_move_anon_rmap() to use a folio migrate: Convert __unmap_and_move() to use folios migrate: Convert unmap_and_move_huge_page() to use folios huge_memory: Convert split_huge_page_to_list() to use a folio huge_memory: Convert unmap_page() to unmap_folio() mm: Convert page_get_anon_vma() to folio_get_anon_vma() rmap: Remove page_unlock_anon_vma_read() uprobes: Use new_folio in __replace_page() mm: Convert lock_page_or_retry() to folio_lock_or_retry() include/linux/huge_mm.h | 5 + include/linux/memcontrol.h | 4 +- include/linux/mm.h | 12 +- include/linux/mm_types.h | 30 ++- include/linux/pagemap.h | 9 +- include/linux/rmap.h | 7 +- include/linux/shmem_fs.h | 6 +- include/linux/swap.h | 35 ++-- kernel/events/uprobes.c | 28 +-- mm/folio-compat.c | 6 + mm/huge_memory.c | 95 +++++----- mm/khugepaged.c | 7 +- mm/ksm.c | 8 +- mm/madvise.c | 49 ++--- mm/memcontrol.c | 21 +- mm/memory-failure.c | 2 +- mm/memory.c | 160 ++++++++-------- mm/migrate.c | 107 ++++++----- mm/page_io.c | 21 +- mm/rmap.c | 33 ++-- mm/shmem.c | 379 ++++++++++++++++++------------------- mm/swap.c | 19 +- mm/swap.h | 16 +- mm/swap_slots.c | 2 +- mm/swap_state.c | 111 +++++------ mm/swapfile.c | 159 ++++++++-------- mm/truncate.c | 2 +- mm/userfaultfd.c | 14 +- mm/vmscan.c | 259 +++++++++++++------------ 29 files changed, 816 insertions(+), 790 deletions(-) -- 2.35.1