All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] restructure memfd code
@ 2017-11-09  1:41 ` Mike Kravetz
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Kravetz @ 2017-11-09  1:41 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Hugh Dickins, Andrea Arcangeli, Michal Hocko,
	Marc-André Lureau, David Herrmann, Andrew Morton,
	Mike Kravetz

With the addition of memfd hugetlbfs support, we now have the situation
where memfd depends on TMPFS -or- HUGETLBFS.  Previously, memfd was only
supported on tmpfs, so it made sense that the code resides in shmem.c.

This patch series moves the memfd code to separate files (memfd.c and
memfd.h).  It creates a new config option MEMFD_CREATE that is defined
if either TMPFS or HUGETLBFS is defined.

In the current code, memfd is only functional if TMPFS is defined.  If
HUGETLFS is defined and TMPFS is not defined, then memfd functionality
will not be available for hugetlbfs.  This does not cause BUGs, just a
potential lack of desired functionality.

Another way to approach this issue would be to simply make HUGETLBFS
depend on TMPFS.

This patch series is built on top of the Marc-André Lureau v3 series
"memfd: add sealing to hugetlb-backed memory":
http://lkml.kernel.org/r/20171107122800.25517-1-marcandre.lureau@redhat.com

Mike Kravetz (3):
  mm: hugetlbfs: move HUGETLBFS_I outside #ifdef CONFIG_HUGETLBFS
  mm: memfd: split out memfd for use by multiple filesystems
  mm: memfd: remove memfd code from shmem files and use new memfd files

 fs/Kconfig               |   3 +
 fs/fcntl.c               |   2 +-
 include/linux/hugetlb.h  |  27 ++--
 include/linux/memfd.h    |  16 +++
 include/linux/shmem_fs.h |  13 --
 mm/Makefile              |   1 +
 mm/memfd.c               | 341 +++++++++++++++++++++++++++++++++++++++++++++++
 mm/shmem.c               | 323 --------------------------------------------
 8 files changed, 378 insertions(+), 348 deletions(-)
 create mode 100644 include/linux/memfd.h
 create mode 100644 mm/memfd.c

-- 
2.13.6

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-11-22  0:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  1:41 [RFC PATCH 0/3] restructure memfd code Mike Kravetz
2017-11-09  1:41 ` Mike Kravetz
2017-11-09  1:41 ` [RFC PATCH 1/3] mm: hugetlbfs: move HUGETLBFS_I outside #ifdef CONFIG_HUGETLBFS Mike Kravetz
2017-11-09  1:41   ` Mike Kravetz
2017-11-09  1:41 ` [RFC PATCH 2/3] mm: memfd: split out memfd for use by multiple filesystems Mike Kravetz
2017-11-09  1:41   ` Mike Kravetz
2017-11-09  1:41 ` [RFC PATCH 3/3] mm: memfd: remove memfd code from shmem files and use new memfd files Mike Kravetz
2017-11-09  1:41   ` Mike Kravetz
2017-11-20 10:28 ` [RFC PATCH 0/3] restructure memfd code Marc-André Lureau
2017-11-20 10:28   ` Marc-André Lureau
2017-11-20 22:55   ` Mike Kravetz
2017-11-20 22:55     ` Mike Kravetz
2017-11-21 16:32 ` Khalid Aziz
2017-11-21 16:32   ` Khalid Aziz
2017-11-22  0:40   ` Mike Kravetz
2017-11-22  0:40     ` Mike Kravetz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.