kernel_optimize_test/mm
Mike Kravetz 5d752600a8 mm: restructure memfd code
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 resided in shmem.c.
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
lack of potentially desired functionality.

Code is restructured in the following way:
- include/linux/memfd.h is a new file containing memfd specific
  definitions previously contained in shmem_fs.h.
- mm/memfd.c is a new file containing memfd specific code previously
  contained in shmem.c.
- memfd specific code is removed from shmem_fs.h and shmem.c.
- A new config option MEMFD_CREATE is added that is defined if TMPFS
  or HUGETLBFS is defined.

No functional changes are made to the code: restructuring only.

Link: http://lkml.kernel.org/r/20180415182119.4517-4-mike.kravetz@oracle.com
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Marc-Andr Lureau <marcandre.lureau@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-07 17:34:35 -07:00
..
kasan kasan: fix memory hotplug during boot 2018-05-25 18:12:11 -07:00
backing-dev.c bdi: Move cgroup bdi_writeback to a dedicated low concurrency workqueue 2018-05-23 15:28:50 -06:00
balloon_compaction.c
bootmem.c
cleancache.c
cma_debug.c
cma.c Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE" 2018-05-24 10:07:50 -07:00
cma.h
compaction.c Revert "mm/cma: manage the memory of the CMA area by using the ZONE_MOVABLE" 2018-05-24 10:07:50 -07:00
debug_page_ref.c
debug.c
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c mm/filemap.c: fix NULL pointer in page_cache_tree_insert() 2018-04-20 17:18:36 -07:00
frame_vector.c
frontswap.c
gup_benchmark.c
gup.c proc: do not access cmdline nor environ from file-backed areas 2018-05-17 09:27:47 -07:00
highmem.c
hmm.c
huge_memory.c There's been a fair amount of work in the docs tree this time around, 2018-06-04 12:34:27 -07:00
hugetlb_cgroup.c
hugetlb.c
hwpoison-inject.c
init-mm.c mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct 2018-06-07 17:34:34 -07:00
internal.h Changes for 4.18: 2018-06-05 13:24:20 -07:00
interval_tree.c
Kconfig There's been a fair amount of work in the docs tree this time around, 2018-06-04 12:34:27 -07:00
Kconfig.debug
khugepaged.c
kmemleak-test.c
kmemleak.c
ksm.c mm/ksm: docs: extend overview comment and make it "DOC:" 2018-04-27 17:19:24 -06:00
list_lru.c
maccess.c
madvise.c
Makefile mm: restructure memfd code 2018-06-07 17:34:35 -07:00
memblock.c
memcontrol.c mm, memcontrol: implement memory.swap.events 2018-06-07 17:34:34 -07:00
memfd.c mm: restructure memfd code 2018-06-07 17:34:35 -07:00
memory_hotplug.c mm/memory_hotplug: fix leftover use of struct page during hotplug 2018-05-25 18:12:11 -07:00
memory-failure.c
memory.c fs/dax.c: use new return type vm_fault_t 2018-06-07 17:34:33 -07:00
mempolicy.c
mempool.c mempool: Add mempool_init()/mempool_exit() 2018-05-14 13:14:23 -06:00
memtest.c
migrate.c mm: migrate: fix double call of radix_tree_replace_slot() 2018-05-11 17:28:45 -07:00
mincore.c
mlock.c
mm_init.c
mmap.c There's been a fair amount of work in the docs tree this time around, 2018-06-04 12:34:27 -07:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c
nommu.c
oom_kill.c mm, oom: fix concurrent munlock and oom reaper unmap, v3 2018-05-11 17:28:45 -07:00
page_alloc.c mm, memory_hotplug: make has_unmovable_pages more robust 2018-05-25 18:12:11 -07:00
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c
page_owner.c
page_poison.c
page_vma_mapped.c
page-writeback.c writeback: safer lock nesting 2018-04-20 17:18:35 -07:00
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c mm: split ->readpages calls to avoid non-contiguous pages lists 2018-06-01 18:37:32 -07:00
rmap.c Linux 4.17-rc2 2018-04-27 17:13:20 -06:00
rodata_test.c
shmem.c mm: restructure memfd code 2018-06-07 17:34:35 -07:00
slab_common.c
slab.c slab: __GFP_ZERO is incompatible with a constructor 2018-06-07 17:34:34 -07:00
slab.h
slob.c slab: __GFP_ZERO is incompatible with a constructor 2018-06-07 17:34:34 -07:00
slub.c mm/slub: remove obsolete comment 2018-06-07 17:34:34 -07:00
sparse-vmemmap.c
sparse.c mm: sections are not offlined during memory hotremove 2018-05-11 17:28:45 -07:00
swap_cgroup.c
swap_slots.c mm, memcontrol: move swap charge handling into get_swap_page() 2018-06-07 17:34:34 -07:00
swap_state.c mm, memcontrol: move swap charge handling into get_swap_page() 2018-06-07 17:34:34 -07:00
swap.c
swapfile.c mm: fix nr_rotate_swap leak in swapon() error case 2018-05-25 18:12:10 -07:00
truncate.c
usercopy.c
userfaultfd.c
util.c
vmacache.c
vmalloc.c proc: introduce proc_create_seq_private 2018-05-16 07:23:35 +02:00
vmpressure.c
vmscan.c mm: fix the NULL mapping case in __isolate_lru_page() 2018-06-02 09:33:47 -07:00
vmstat.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
workingset.c
z3fold.c z3fold: fix reclaim lock-ups 2018-05-11 17:28:45 -07:00
zbud.c
zpool.c
zsmalloc.c
zswap.c