linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] Convert the swap code to be more folio-based
@ 2022-06-17 17:49 Matthew Wilcox (Oracle)
  2022-06-17 17:49 ` [PATCH 01/22] mm: Add folios_put() Matthew Wilcox (Oracle)
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Matthew Wilcox (Oracle) @ 2022-06-17 17:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Matthew Wilcox (Oracle), linux-mm

(resend due to email address mistake)

There's still more to do with the swap code, but this reaps a lot of
the folio benefit.  More than 4kB of kernel text saved (with the UEK7
kernel config).  I don't know how much that's going to translate into
CPU savings, but some of those compound_head() calls are on every page
free, so it should be noticable.  It might even be noticable just from
an I-cache consumption perspective.

This is against next-20220617 plus my prior vmscan patch series.  It's in
the middle of an xfstests run right now, so it at least boots.

Matthew Wilcox (Oracle) (22):
  mm: Add folios_put()
  mm/swap: Add folio_batch_move_lru()
  mm/swap: Make __pagevec_lru_add static
  mm/swap: Convert lru_add to a folio_batch
  mm/swap: Convert lru_deactivate_file to a folio_batch
  mm/swap: Convert lru_deactivate to a folio_batch
  mm/swap: Convert lru_lazyfree to a folio_batch
  mm/swap: Convert activate_page to a folio_batch
  mm/swap: Rename lru_pvecs to cpu_fbatches
  mm/swap: Pull the CPU conditional out of __lru_add_drain_all()
  mm/swap: Optimise lru_add_drain_cpu()
  mm/swap: Convert try_to_free_swap to use a folio
  mm/swap: Convert release_pages to use a folio internally
  mm/swap: Convert put_pages_list to use folios
  mm/swap: Convert __put_page() to __folio_put()
  mm/swap: Convert __put_single_page() to __folio_put_small()
  mm/swap: Convert __put_compound_page() to __folio_put_large()
  mm/swap: Convert __page_cache_release() to use a folio
  mm: Convert destroy_compound_page() to destroy_large_folio()
  mm: Convert page_swap_flags to folio_swap_flags
  mm/swap: Convert delete_from_swap_cache() to take a folio
  mm/swap: Convert __delete_from_swap_cache() to a folio

 include/linux/mm.h      |  33 ++-
 include/linux/pagemap.h |   2 -
 include/linux/pagevec.h |   1 -
 mm/memory-failure.c     |   5 +-
 mm/shmem.c              |   4 +-
 mm/swap.c               | 599 +++++++++++++++++++---------------------
 mm/swap.h               |  14 +-
 mm/swap_state.c         |  39 +--
 mm/swapfile.c           |  23 +-
 mm/vmscan.c             |   8 +-
 net/core/page_pool.c    |   2 +-
 11 files changed, 359 insertions(+), 371 deletions(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-06-17 17:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 17:49 [PATCH 00/22] Convert the swap code to be more folio-based Matthew Wilcox (Oracle)
2022-06-17 17:49 ` [PATCH 01/22] mm: Add folios_put() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 02/22] mm/swap: Add folio_batch_move_lru() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 03/22] mm/swap: Make __pagevec_lru_add static Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 04/22] mm/swap: Convert lru_add to a folio_batch Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 05/22] mm/swap: Convert lru_deactivate_file " Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 06/22] mm/swap: Convert lru_deactivate " Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 07/22] mm/swap: Convert lru_lazyfree " Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 08/22] mm/swap: Convert activate_page " Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 09/22] mm/swap: Rename lru_pvecs to cpu_fbatches Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 10/22] mm/swap: Pull the CPU conditional out of __lru_add_drain_all() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 11/22] mm/swap: Optimise lru_add_drain_cpu() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 12/22] mm/swap: Convert try_to_free_swap to use a folio Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 13/22] mm/swap: Convert release_pages to use a folio internally Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 14/22] mm/swap: Convert put_pages_list to use folios Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 15/22] mm/swap: Convert __put_page() to __folio_put() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 16/22] mm/swap: Convert __put_single_page() to __folio_put_small() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 17/22] mm/swap: Convert __put_compound_page() to __folio_put_large() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 18/22] mm/swap: Convert __page_cache_release() to use a folio Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 19/22] mm: Convert destroy_compound_page() to destroy_large_folio() Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 20/22] mm: Convert page_swap_flags to folio_swap_flags Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 21/22] mm/swap: Convert delete_from_swap_cache() to take a folio Matthew Wilcox (Oracle)
2022-06-17 17:50 ` [PATCH 22/22] mm/swap: Convert __delete_from_swap_cache() to " Matthew Wilcox (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox