Skip to content

huge tmpfs: an alternative approach to THPageCache

Hugh Dickins linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24mm: update_lru_size warn and reset bad lru_sizeinclude/linux/mm_inline.h mm/memcontrol.c+21 -52 replies
2/24mm: update_lru_size do the __mod_zone_page_stateinclude/linux/memcontrol.h include/linux/mm_inline.h mm/memcontrol.c +1 more+31 -260 replies
3/24mm: use __SetPageSwapBacked and don't ClearPageSwapBackedmm/migrate.c mm/rmap.c mm/shmem.c +2 more+8 -102 replies
4/24mm: make page migration's newpage handling more robustmm/balloon_compaction.c mm/migrate.c+63 -670 replies
5/24tmpfs: preliminary minor tidyupsinclude/linux/mempolicy.h mm/shmem.c+34 -450 replies
6/24huge tmpfs: prepare counts in meminfo, vmstat and SysRq-mdrivers/base/node.c fs/proc/meminfo.c include/linux/mmzone.h +4 more+42 -210 replies
7/24huge tmpfs: include shmem freeholes in available memory countsfs/proc/meminfo.c mm/mmap.c mm/page-writeback.c +1 more+11 -10 replies
8/24huge tmpfs: prepare huge=N mount option and /proc/sys/vm/shmem_hugeinclude/linux/shmem_fs.h kernel/sysctl.c mm/shmem.c+82 -50 replies
9/24huge tmpfs: try to allocate huge pages, split into a teaminclude/linux/page-flags.h include/linux/pageteam.h mm/shmem.c+367 -280 replies
10/24huge tmpfs: avoid team pages in a few placesinclude/linux/mm.h mm/compaction.c mm/memcontrol.c +3 more+68 -500 replies
11/24huge tmpfs: shrinker to migrate and free underused holesinclude/linux/migrate.h include/linux/mm_types.h include/linux/shmem_fs.h +2 more+436 -136 replies
12/24huge tmpfs: get_unmapped_area align and fault supply huge pagedrivers/char/mem.c include/linux/mm.h include/linux/shmem_fs.h +4 more+243 -100 replies
13/24huge tmpfs: extend get_user_pages_fast to shmem pmdarch/mips/mm/gup.c arch/s390/mm/gup.c arch/sparc/mm/gup.c +2 more+87 -130 replies
14/24huge tmpfs: extend vma_adjust_trans_huge to shmem pmdarch/powerpc/mm/pgtable_64.c include/linux/huge_mm.h mm/huge_memory.c+12 -70 replies
15/24huge tmpfs: rework page_referenced_one and try_to_unmap_oneinclude/linux/pageteam.h mm/rmap.c+133 -310 replies
16/24huge tmpfs: fix problems from premature exposure of pagetablemm/filemap.c mm/memory.c+118 -941 reply
17/24huge tmpfs: map shmem by huge page pmd or by page team ptesinclude/linux/pageteam.h mm/huge_memory.c mm/memory.c+273 -170 replies
18/24huge tmpfs: mmap_sem is unlocked when truncation splits huge pmdmm/memory.c+2 -110 replies
19/24huge tmpfs: disband split huge pmds on race or memory failuremm/memory-failure.c mm/shmem.c+33 -20 replies
20/24huge tmpfs: use Unevictable lru with variable hpage_nr_pages()include/linux/huge_mm.h include/linux/pageteam.h mm/memcontrol.c +3 more+243 -330 replies
21/24huge tmpfs: fix Mlocked meminfo, tracking huge and unhuge mlocksinclude/linux/pageteam.h mm/huge_memory.c mm/internal.h +2 more+193 -910 replies
22/24huge tmpfs: fix Mapped meminfo, tracking huge and unhuge mappingsinclude/linux/memcontrol.h include/linux/pageteam.h mm/huge_memory.c +2 more+194 -190 replies
23/24kvm: plumb return of hva when resolving page fault.arch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h include/linux/kvm_host.h +1 more+28 -170 replies
24/24kvm: teach kvm to map page teams as huge pages.arch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+132 -260 replies

Reviews trailers per patch

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

PatchMel Gorman
1/24
2/24
3/24R-b
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
24/24

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 00/24] huge tmpfs: an alternative approach to THPageCache

I warned last month that I have been working on "huge tmpfs":
an implementation of Transparent Huge Page Cache in tmpfs, for those who are tired of the limitations of hugetlbfs.

Here's a fully working patchset, against v3.19 so that you can give it a try against a stable base. I've not yet studied how well it applies to current git: probably lots of easily resolved clashes with nonlinear removal. Against mmotm, the rmap.c differences looked nontrivial.

Fully working? Well, at present page migration just keeps away from these teams of pages. And once memory pressure has disbanded a team to swap it out, there is nothing to put it together again later on, to restore the original hugepage performance. Those must follow, but no thought yet (khugepaged? maybe).

Yes, I realize there's nothing yet under Documentation, nor fs/proc beyond meminfo, nor other debug/visibility files: must follow, but I've cared more to provide the basic functionality.

I don't expect to update this patchset in the next few weeks: now that it's posted, my priority is look at other people's work before LSF/MM; and in particular, of course, your (Kirill's) THP refcounting redesign.

01 mm: update_lru_size warn and reset bad lru_size
02 mm: update_lru_size do the __mod_zone_page_state
03 mm: use __SetPageSwapBacked and don't ClearPageSwapBacked 04 mm: make page migration's newpage handling more robust 05 tmpfs: preliminary minor tidyups
06 huge tmpfs: prepare counts in meminfo, vmstat and SysRq-m 07 huge tmpfs: include shmem freeholes in available memory counts 08 huge tmpfs: prepare huge=N mount option and /proc/sys/vm/shmem_huge 09 huge tmpfs: try to allocate huge pages, split into a team 10 huge tmpfs: avoid team pages in a few places
11 huge tmpfs: shrinker to migrate and free underused holes 12 huge tmpfs: get_unmapped_area align and fault supply huge page 13 huge tmpfs: extend get_user_pages_fast to shmem pmd
14 huge tmpfs: extend vma_adjust_trans_huge to shmem pmd
15 huge tmpfs: rework page_referenced_one and try_to_unmap_one 16 huge tmpfs: fix problems from premature exposure of pagetable 17 huge tmpfs: map shmem by huge page pmd or by page team ptes 18 huge tmpfs: mmap_sem is unlocked when truncation splits huge pmd 19 huge tmpfs: disband split huge pmds on race or memory failure 20 huge tmpfs: use Unevictable lru with variable hpage_nr_pages() 21 huge tmpfs: fix Mlocked meminfo, tracking huge and unhuge mlocks 22 huge tmpfs: fix Mapped meminfo, tracking huge and unhuge mappings 23 kvm: plumb return of hva when resolving page fault.
24 kvm: teach kvm to map page teams as huge pages.

 arch/mips/mm/gup.c             |   17 
 arch/powerpc/mm/pgtable_64.c   |    7 
 arch/s390/mm/gup.c             |   22 
 arch/sparc/mm/gup.c            |   22 
 arch/x86/kvm/mmu.c             |  171 +++-
 arch/x86/kvm/paging_tmpl.h     |    6 
 arch/x86/mm/gup.c              |   17 
 drivers/base/node.c            |   20 
 drivers/char/mem.c             |   23 
 fs/proc/meminfo.c              |   17 
 include/linux/huge_mm.h        |   18 
 include/linux/kvm_host.h       |    2 
 include/linux/memcontrol.h     |   11 
 include/linux/mempolicy.h      |    6 
 include/linux/migrate.h        |    3 
 include/linux/mm.h             |   95 +-
 include/linux/mm_inline.h      |   24 
 include/linux/mm_types.h       |    1 
 include/linux/mmzone.h         |    5 
 include/linux/page-flags.h     |    6 
 include/linux/pageteam.h       |  289 +++++++
 include/linux/shmem_fs.h       |   21 
 include/trace/events/migrate.h |    3 
 ipc/shm.c                      |    6 
 kernel/sysctl.c                |   12 
 mm/balloon_compaction.c        |   10 
 mm/compaction.c                |    6 
 mm/filemap.c                   |   10 
 mm/gup.c                       |   22 
 mm/huge_memory.c               |  281 ++++++-
 mm/internal.h                  |   25 
 mm/memcontrol.c                |   42 -
 mm/memory-failure.c            |    8 
 mm/memory.c                    |  227 +++--
 mm/migrate.c                   |  139 +--
 mm/mlock.c                     |  181 ++--
 mm/mmap.c                      |   17 
 mm/page-writeback.c            |    2 
 mm/page_alloc.c                |   13 
 mm/rmap.c                      |  207 +++--
 mm/shmem.c                     | 1235 +++++++++++++++++++++++++++++--
 mm/swap.c                      |    5 
 mm/swap_state.c                |    3 
 mm/truncate.c                  |    2 
 mm/vmscan.c                    |   76 +
 mm/vmstat.c                    |    3 
 mm/zswap.c                     |    3 
 virt/kvm/kvm_main.c            |   24 
 48 files changed, 2790 insertions(+), 575 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>