Skip to content

mm: rmap: merge HugeTLB mapcount logic with THPs

James Houghton linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm: rmap: make hugetlb pages participate in _nr_pages_mappedinclude/linux/mm.h mm/hugetlb.c mm/internal.h +2 more+25 -264 replies
2/2mm: rmap: increase COMPOUND_MAPPED to support 512G HugeTLB pagesmm/internal.h+4 -40 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMike Kravetz
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm: rmap: merge HugeTLB mapcount logic with THPs

HugeTLB pages may soon support being mapped with PTEs. To allow for this case, merge HugeTLB's mapcount scheme with THP's.

The first patch of this series comes from the HugeTLB high-granularity mapping series[1], though with some updates, as the original version was buggy[2] and incomplete.

I am sending this change as part of this smaller series in hopes that it can be more thoroughly scrutinized.

I haven't run any THP performance tests with this series applied. HugeTLB pages don't currently support being mapped with compound=false, but this mapcount scheme will make collapsing compound=false mappings in HugeTLB pages quite slow. This can be optimized with future patches (likely by taking advantage of HugeTLB's alignment guarantees).

Matthew Wilcox is working on a mapcounting scheme[3] that will avoid the use of each subpage's mapcount. If this series is applied, Matthew's new scheme will automatically apply to HugeTLB pages.

[1]: https://lore.kernel.org/linux-mm/[email protected]/
[2]: https://lore.kernel.org/linux-mm/CACw3F538H+bYcvSY-qG4-gmrgGPRBgTScDzrX9suLyp_q+v_bQ@mail.gmail.com/
[3]: https://lore.kernel.org/linux-mm/Y9Afwds%[email protected]/

James Houghton (2):
mm: rmap: make hugetlb pages participate in _nr_pages_mapped
mm: rmap: increase COMPOUND_MAPPED to support 512G HugeTLB pages

 include/linux/mm.h |  7 +------
 mm/hugetlb.c       |  4 ++--
 mm/internal.h      |  9 ++++-----
 mm/migrate.c       |  2 +-
 mm/rmap.c          | 35 ++++++++++++++++++++---------------
 5 files changed, 28 insertions(+), 29 deletions(-)

base-commit: 9caa15b8a49949342bdf495bd47660267a3bd371

Signature · 1 line
2.40.0.rc0.216.gc4246ad0f0-goog