[PATCH 00/10] use folio in ksm

From: alexs
Date: Tue Jun 04 2024 - 00:21:40 EST


From: "Alex Shi (tencent)" <alexs@xxxxxxxxxx>

This is the 2nd part to use folio in ksm, it saves 82kbytes in ksm.o and
passed all ksm testcases in kselftest.

KSM still split same folios to single page if they are good to be KSM,
but will skip the rest subpage checking if a folio couldn't suit for
ksm.

Alex Shi (tencent) (10):
mm/ksm: reduce the flush action for ksm merging page
mm/ksm: skip subpages of compound pages
mm/ksm: use folio in try_to_merge_one_page
mm/ksm: add identical_folio func
mm/ksm: use folio in stable_tree_search
mm/ksm: remove page_stable_node
mm/ksm: use folio in unstable_tree_search_insert
mm/ksm: use folio in try_to_merge_xx serie funcs
mm/ksm: calc_checksum for folio
m/ksm: use folio in ksm scan path

include/linux/mm.h | 17 ++++
mm/ksm.c | 230 +++++++++++++++++++++++----------------------
2 files changed, 135 insertions(+), 112 deletions(-)

--
2.43.0