Skip to content

tmpfs: HUGEPAGE and MEM_LOCK fcntls and memfds

Hugh Dickins linux-api linux-fsdevel linux-mm lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 28 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16huge tmpfs: fix fallocate(vanilla) advance over huge pagesmm/shmem.c+16 -33 replies
2/16huge tmpfs: fix split_huge_page() after FALLOC_FL_KEEP_SIZEinclude/linux/shmem_fs.h mm/huge_memory.c mm/shmem.c+31 -31 reply
3/16huge tmpfs: remove shrinklist addition from shmem_setattr()mm/shmem.c+0 -191 reply
4/16huge tmpfs: revert shmem's use of transhuge_vma_enabled()mm/shmem.c+2 -13 replies
5/16huge tmpfs: move shmem_huge_enabled() upwardsmm/shmem.c+35 -371 reply
6/16huge tmpfs: shmem_is_huge(vma, inode, index)include/linux/shmem_fs.h mm/khugepaged.c mm/shmem.c+32 -6312 replies
7/16memfd: memfd_create(name, MFD_HUGEPAGE) for shmem huge pagesinclude/uapi/linux/memfd.h mm/memfd.c mm/shmem.c+51 -92 replies
8/16huge tmpfs: fcntl(fd, F_HUGEPAGE) and fcntl(fd, F_NOHUGEPAGE)fs/fcntl.c include/linux/shmem_fs.h include/uapi/linux/fcntl.h +1 more+85 -72 replies
9/16huge tmpfs: decide stat.st_blksize by shmem_is_huge()mm/shmem.c+1 -111 reply
10/16tmpfs: fcntl(fd, F_MEM_LOCK) to memlock a tmpfs filefs/fcntl.c include/linux/shmem_fs.h include/uapi/linux/fcntl.h +1 more+66 -32 replies
11/16tmpfs: fcntl(fd, F_MEM_LOCKED) to test if memlockedfs/fcntl.c include/uapi/linux/fcntl.h mm/shmem.c+6 -00 replies
12/16tmpfs: refuse memlock when fallocated beyond i_sizemm/shmem.c+6 -20 replies
13/16mm: bool user_shm_lock(loff_t size, struct ucounts *)include/linux/mm.h mm/mlock.c+9 -90 replies
14/16mm: user_shm_lock(,,getuc) and user_shm_unlock(,,putuc)fs/hugetlbfs/inode.c include/linux/mm.h ipc/shm.c +2 more+14 -130 replies
15/16tmpfs: permit changing size of memlocked filemm/shmem.c+38 -100 replies
16/16memfd: memfd_create(name, MFD_MEM_LOCK) for memlocked shmeminclude/uapi/linux/memfd.h mm/memfd.c mm/shmem.c+18 -30 replies

Reviews trailers per patch

4 of 16 patches have a Reviewed-by or Acked-by.

PatchYang Shi
1/16R-b
2/16R-b
3/16
4/16
5/16R-b
6/16
7/16
8/16
9/16R-b
10/16
11/16
12/16
13/16
14/16
15/16
16/16

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/16] tmpfs: HUGEPAGE and MEM_LOCK fcntls and memfds

A series of HUGEPAGE and MEM_LOCK tmpfs fcntls and memfd_create flags, after fixes (not essential for stable) and cleanups in related areas.

Against 5.14-rc3: currently no conflict with linux-next or mmotm.

01/16 huge tmpfs: fix fallocate(vanilla) advance over huge pages 02/16 huge tmpfs: fix split_huge_page() after FALLOC_FL_KEEP_SIZE 03/16 huge tmpfs: remove shrinklist addition from shmem_setattr() 04/16 huge tmpfs: revert shmem's use of transhuge_vma_enabled() 05/16 huge tmpfs: move shmem_huge_enabled() upwards 06/16 huge tmpfs: shmem_is_huge(vma, inode, index)
07/16 memfd: memfd_create(name, MFD_HUGEPAGE) for shmem huge pages 08/16 huge tmpfs: fcntl(fd, F_HUGEPAGE) and fcntl(fd, F_NOHUGEPAGE) 09/16 huge tmpfs: decide stat.st_blksize by shmem_is_huge() 10/16 tmpfs: fcntl(fd, F_MEM_LOCK) to memlock a tmpfs file 11/16 tmpfs: fcntl(fd, F_MEM_LOCKED) to test if memlocked 12/16 tmpfs: refuse memlock when fallocated beyond i_size 13/16 mm: bool user_shm_lock(loff_t size, struct ucounts *) 14/16 mm: user_shm_lock(,,getuc) and user_shm_unlock(,,putuc) 15/16 tmpfs: permit changing size of memlocked file 16/16 memfd: memfd_create(name, MFD_MEM_LOCK) for memlocked shmem

 fs/fcntl.c                 |    8 
 fs/hugetlbfs/inode.c       |    4 
 include/linux/mm.h         |    4 
 include/linux/shmem_fs.h   |   31 ++-
 include/uapi/linux/fcntl.h |   17 +
 include/uapi/linux/memfd.h |    4 
 ipc/shm.c                  |    4 
 mm/huge_memory.c           |    6 
 mm/khugepaged.c            |    2 
 mm/memfd.c                 |   27 ++
 mm/mlock.c                 |   19 -
 mm/shmem.c                 |  397 ++++++++++++++++++++++++++-------------
 12 files changed, 370 insertions(+), 153 deletions(-)

Hugh