Skip to content

huge tmpfs: shmem_is_huge() fixes and cleanups

Hugh Dickins linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 2 repliesIn review 8 of 9 applied

Patches in v1 8 of 9 applied

#Subject and filesSizeRepliesApplied
1/9huge tmpfs: fix fallocate(vanilla) advance over huge pagesmm/shmem.c+16 -30 replies
2/9huge tmpfs: fix split_huge_page() after FALLOC_FL_KEEP_SIZEinclude/linux/shmem_fs.h mm/huge_memory.c mm/shmem.c+31 -30 repliesApplied
3/9huge tmpfs: remove shrinklist addition from shmem_setattr()mm/shmem.c+0 -190 repliesApplied
4/9huge tmpfs: revert shmem's use of transhuge_vma_enabled()mm/shmem.c+2 -10 repliesApplied
5/9huge tmpfs: move shmem_huge_enabled() upwardsmm/shmem.c+35 -370 repliesApplied
6/9huge tmpfs: SGP_NOALLOC to stop collapse_file() on raceinclude/linux/shmem_fs.h mm/khugepaged.c mm/shmem.c+19 -131 replyApplied
7/9huge tmpfs: shmem_is_huge(vma, inode, index)include/linux/shmem_fs.h mm/shmem.c+31 -621 replyApplied
8/9huge tmpfs: decide stat.st_blksize by shmem_is_huge()mm/shmem.c+1 -110 repliesApplied
9/9shmem: shmem_writepage() split unlikely i915 THPmm/shmem.c+13 -10 repliesApplied

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchYang ShiShakeel Butt
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9A-b R-b

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/9] huge tmpfs: shmem_is_huge() fixes and cleanups

A series of huge tmpfs fixes and cleanups, suitable for 5.15, taken from the earlier 16 "tmpfs: HUGEPAGE and MEM_LOCK fcntls and flags":
https://lore.kernel.org/linux-mm/[email protected]/

The API additions in that series have not yet been fully agreed, let's revisit those after the 5.15 merge window, but please proceed now with the uncontroversial preliminaries - thanks.

Still diffed against 5.14-rc3: no conflict yet with 5.14-rc6 or linux-next or mmotm - no problems with the foliage.

Most exactly as in the 16, with a few commit comments clarified from review; most already Reviewed-by Yang Shi (many thanks!), tags added.

Exceptions: 6/9 SGP_NOALLOC introduced to resolve our review doubts, that and 7/9 not yet tagged, 9/9 now added from a posting last year:
Kirill's "What breaks?" if shmem_enabled "always" reminds me that I'm still carrying the i915 THP fix, as corrected by Matthew.

1/9 huge tmpfs: fix fallocate(vanilla) advance over huge pages 2/9 huge tmpfs: fix split_huge_page() after FALLOC_FL_KEEP_SIZE 3/9 huge tmpfs: remove shrinklist addition from shmem_setattr() 4/9 huge tmpfs: revert shmem's use of transhuge_vma_enabled() 5/9 huge tmpfs: move shmem_huge_enabled() upwards
6/9 huge tmpfs: SGP_NOALLOC to stop collapse_file() on race 7/9 huge tmpfs: shmem_is_huge(vma, inode, index)
8/9 huge tmpfs: decide stat.st_blksize by shmem_is_huge() 9/9 shmem: shmem_writepage() split unlikely i915 THP

 include/linux/shmem_fs.h |   23 +++-
 mm/huge_memory.c         |    6 -
 mm/khugepaged.c          |    2 
 mm/shmem.c               |  229 ++++++++++++++++++-----------------------
 4 files changed, 129 insertions(+), 131 deletions(-)

Hugh