mbox series

[v4,0/9] transfer page to folio in KSM

Message ID 20240409092826.1733637-1-alexs@kernel.org (mailing list archive)
Headers show
Series transfer page to folio in KSM | expand

Message

alexs@kernel.org April 9, 2024, 9:28 a.m. UTC
From: "Alex Shi (tencent)" <alexs@kernel.org>

This is the first part of page to folio transfer on KSM. Since only
single page could be stored in KSM, we could safely transfer stable tree
pages to folios. 
This patchset could reduce ksm.o 57kbytes from 2541776 bytes on latest
akpm/mm-stable branch with CONFIG_DEBUG_VM enabled. It pass the KSM testing
in LTP and kernel selftest.

Thanks for Matthew Wilcox and David Hildenbrand's suggestions and comments!

Alex Shi (tencent) (9):
  mm/ksm: add ksm_get_folio
  mm/ksm: use folio in remove_rmap_item_from_tree
  mm/ksm: add folio_set_stable_node
  mm/ksm: use folio in remove_stable_node
  mm/ksm: use folio in stable_node_dup
  mm/ksm: use ksm_get_folio in scan_get_next_rmap_item
  mm/ksm: use folio in write_protect_page
  mm/ksm: Convert chain series funcs to use and return folios
  mm/ksm: replace set_page_stable_node by folio_set_stable_node

 mm/ksm.c     | 263 ++++++++++++++++++++++++++-------------------------
 mm/migrate.c |   2 +-
 2 files changed, 134 insertions(+), 131 deletions(-)