[PATCH 0/3] mm,thp,rmap: rework the use of subpages_mapcount

From: Hugh Dickins
Date: Fri Nov 18 2022 - 04:08:47 EST


Linus was underwhelmed by the earlier compound mapcounts series:
this series builds on top of it (as in next-20221117) to follow
up on his suggestions - except rmap.c still using lock_page_memcg(),
since I hesitate to steal the pleasure of deletion from Johannes.

1/3 mm,thp,rmap: subpages_mapcount of PTE-mapped subpages
2/3 mm,thp,rmap: subpages_mapcount COMPOUND_MAPPED if PMD-mapped
3/3 mm,thp,rmap: clean up the end of __split_huge_pmd_locked()

Documentation/mm/transhuge.rst | 10 +-
include/linux/mm.h | 65 +++++++----
include/linux/rmap.h | 12 +-
mm/debug.c | 2 +-
mm/huge_memory.c | 15 +--
mm/rmap.c | 213 ++++++++++-------------------------
6 files changed, 119 insertions(+), 198 deletions(-)

Hugh