summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/Kconfig77
-rw-r--r--mm/Makefile7
-rw-r--r--mm/backing-dev.c66
-rw-r--r--mm/balloon_compaction.c4
-rw-r--r--mm/cma.c62
-rw-r--r--mm/cma.h25
-rw-r--r--mm/cma_debug.c8
-rw-r--r--mm/cma_sysfs.c112
-rw-r--r--mm/compaction.c115
-rw-r--r--mm/debug.c25
-rw-r--r--mm/debug_vm_pgtable.c71
-rw-r--r--mm/dmapool.c7
-rw-r--r--mm/filemap.c185
-rw-r--r--mm/frontswap.c12
-rw-r--r--mm/gup.c398
-rw-r--r--mm/gup_test.c29
-rw-r--r--mm/gup_test.h3
-rw-r--r--mm/highmem.c13
-rw-r--r--mm/huge_memory.c386
-rw-r--r--mm/hugetlb.c942
-rw-r--r--mm/hugetlb_cgroup.c9
-rw-r--r--mm/internal.h126
-rw-r--r--mm/interval_tree.c2
-rw-r--r--mm/io-mapping.c29
-rw-r--r--mm/ioremap.c225
-rw-r--r--mm/kasan/Makefile4
-rw-r--r--mm/kasan/common.c53
-rw-r--r--mm/kasan/generic.c15
-rw-r--r--mm/kasan/hw_tags.c104
-rw-r--r--mm/kasan/init.c10
-rw-r--r--mm/kasan/kasan.h84
-rw-r--r--mm/kasan/quarantine.c4
-rw-r--r--mm/kasan/report.c26
-rw-r--r--mm/kasan/report_generic.c4
-rw-r--r--mm/kasan/report_hw_tags.c5
-rw-r--r--mm/kasan/report_sw_tags.c43
-rw-r--r--mm/kasan/report_tags.c51
-rw-r--r--mm/kasan/shadow.c20
-rw-r--r--mm/kasan/sw_tags.c54
-rw-r--r--mm/kasan/tags.c59
-rw-r--r--mm/kfence/core.c59
-rw-r--r--mm/kfence/kfence_test.c5
-rw-r--r--mm/kfence/report.c2
-rw-r--r--mm/khugepaged.c65
-rw-r--r--mm/kmemleak.c20
-rw-r--r--mm/ksm.c26
-rw-r--r--mm/list_lru.c6
-rw-r--r--mm/madvise.c4
-rw-r--r--mm/mapping_dirty_helpers.c2
-rw-r--r--mm/memblock.c8
-rw-r--r--mm/memcontrol.c1168
-rw-r--r--mm/memfd.c4
-rw-r--r--mm/memory-failure.c457
-rw-r--r--mm/memory.c276
-rw-r--r--mm/memory_hotplug.c222
-rw-r--r--mm/mempolicy.c98
-rw-r--r--mm/mempool.c8
-rw-r--r--mm/memremap.c2
-rw-r--r--mm/migrate.c104
-rw-r--r--mm/mlock.c26
-rw-r--r--mm/mm_init.c4
-rw-r--r--mm/mmap.c92
-rw-r--r--mm/mmap_lock.c33
-rw-r--r--mm/mmu_gather.c29
-rw-r--r--mm/mprotect.c2
-rw-r--r--mm/mremap.c13
-rw-r--r--mm/msync.c6
-rw-r--r--mm/nommu.c12
-rw-r--r--mm/oom_kill.c6
-rw-r--r--mm/page-writeback.c107
-rw-r--r--mm/page_alloc.c1251
-rw-r--r--mm/page_counter.c8
-rw-r--r--mm/page_ext.c2
-rw-r--r--mm/page_owner.c72
-rw-r--r--mm/page_poison.c6
-rw-r--r--mm/page_reporting.c19
-rw-r--r--mm/page_reporting.h5
-rw-r--r--mm/page_vma_mapped.c162
-rw-r--r--mm/pagewalk.c58
-rw-r--r--mm/percpu-internal.h2
-rw-r--r--mm/percpu-vm.c7
-rw-r--r--mm/percpu.c2
-rw-r--r--mm/pgalloc-track.h6
-rw-r--r--mm/pgtable-generic.c5
-rw-r--r--mm/process_vm_access.c1
-rw-r--r--mm/ptdump.c2
-rw-r--r--mm/readahead.c101
-rw-r--r--mm/rmap.c41
-rw-r--r--mm/shmem.c67
-rw-r--r--mm/shuffle.c4
-rw-r--r--mm/shuffle.h4
-rw-r--r--mm/slab.c53
-rw-r--r--mm/slab.h49
-rw-r--r--mm/slab_common.c85
-rw-r--r--mm/slob.c2
-rw-r--r--mm/slub.c551
-rw-r--r--mm/sparse.c18
-rw-r--r--mm/swap.c77
-rw-r--r--mm/swap_slots.c4
-rw-r--r--mm/swap_state.c39
-rw-r--r--mm/swapfile.c183
-rw-r--r--mm/truncate.c62
-rw-r--r--mm/userfaultfd.c67
-rw-r--r--mm/util.c39
-rw-r--r--mm/vmalloc.c872
-rw-r--r--mm/vmscan.c454
-rw-r--r--mm/vmstat.c283
-rw-r--r--mm/workingset.c3
-rw-r--r--mm/z3fold.c2
-rw-r--r--mm/zpool.c2
-rw-r--r--mm/zsmalloc.c12
-rw-r--r--mm/zswap.c2
112 files changed, 6969 insertions, 4055 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index 24c045b24b95..ded98fb859ab 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -9,7 +9,6 @@ config SELECT_MEMORY_MODEL
choice
prompt "Memory model"
depends on SELECT_MEMORY_MODEL
- default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT
default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT
default FLATMEM_MANUAL
help
@@ -20,7 +19,7 @@ choice
config FLATMEM_MANUAL
bool "Flat Memory"
- depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || ARCH_FLATMEM_ENABLE
+ depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE
help
This option is best suited for non-NUMA systems with
flat address space. The FLATMEM is the most efficient
@@ -33,21 +32,6 @@ config FLATMEM_MANUAL
If unsure, choose this option (Flat Memory) over any other.
-config DISCONTIGMEM_MANUAL
- bool "Discontiguous Memory"
- depends on ARCH_DISCONTIGMEM_ENABLE
- help
- This option provides enhanced support for discontiguous
- memory systems, over FLATMEM. These systems have holes
- in their physical address spaces, and this option provides
- more efficient handling of these holes.
-
- Although "Discontiguous Memory" is still used by several
- architectures, it is considered deprecated in favor of
- "Sparse Memory".
-
- If unsure, choose "Sparse Memory" over this option.
-
config SPARSEMEM_MANUAL
bool "Sparse Memory"
depends on ARCH_SPARSEMEM_ENABLE
@@ -63,30 +47,13 @@ config SPARSEMEM_MANUAL
endchoice
-config DISCONTIGMEM
- def_bool y
- depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
-
config SPARSEMEM
def_bool y
depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL
config FLATMEM
def_bool y
- depends on (!DISCONTIGMEM && !SPARSEMEM) || FLATMEM_MANUAL
-
-config FLAT_NODE_MEM_MAP
- def_bool y
- depends on !SPARSEMEM
-
-#
-# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
-# to represent different areas of memory. This variable allows
-# those dependencies to exist individually.
-#
-config NEED_MULTIPLE_NODES
- def_bool y
- depends on DISCONTIGMEM || NUMA
+ depends on !SPARSEMEM || FLATMEM_MANUAL
#
# SPARSEMEM_EXTREME (which is the default) does some bootmem
@@ -149,6 +116,9 @@ config MEMORY_ISOLATION
config HAVE_BOOTMEM_INFO_NODE
def_bool n
+config ARCH_ENABLE_MEMORY_HOTPLUG
+ bool
+
# eventually, we can have this option just 'select SPARSEMEM'
config MEMORY_HOTPLUG
bool "Allow for memory hot-add"
@@ -177,12 +147,20 @@ config MEMORY_HOTPLUG_DEFAULT_ONLINE
Say N here if you want the default policy to keep all hot-plugged
memory blocks in 'offline' state.
+config ARCH_ENABLE_MEMORY_HOTREMOVE
+ bool
+
config MEMORY_HOTREMOVE
bool "Allow for memory hot remove"
select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
depends on MIGRATION
+config MHP_MEMMAP_ON_MEMORY
+ def_bool y
+ depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP
+ depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
+
# Heavily threaded applications may benefit from splitting the mm-wide
# page_table_lock, so that faults on different parts of the user address
# space can be handled with less contention: split it at this NR_CPUS.
@@ -274,6 +252,13 @@ config ARCH_ENABLE_HUGEPAGE_MIGRATION
config ARCH_ENABLE_THP_MIGRATION
bool
+config HUGETLB_PAGE_SIZE_VARIABLE
+ def_bool n
+ help
+ Allows the pageblock_order value to be dynamic instead of just standard
+ HUGETLB_PAGE_ORDER when there are multiple HugeTLB page sizes available
+ on a platform.
+
config CONTIG_ALLOC
def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
@@ -283,12 +268,11 @@ config PHYS_ADDR_T_64BIT
config BOUNCE
bool "Enable bounce buffers"
default y
- depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
+ depends on BLOCK && MMU && HIGHMEM
help
- Enable bounce buffers for devices that cannot access
- the full range of memory available to the CPU. Enabled
- by default when ZONE_DMA or HIGHMEM is selected, but you
- may say n to override this.
+ Enable bounce buffers for devices that cannot access the full range of
+ memory available to the CPU. Enabled by default when HIGHMEM is
+ selected, but you may say n to override this.
config VIRT_TO_BUS
bool
@@ -513,6 +497,13 @@ config CMA_DEBUGFS
help
Turns on the DebugFS interface for CMA.
+config CMA_SYSFS
+ bool "CMA information through sysfs interface"
+ depends on CMA && SYSFS
+ help
+ This option exposes some sysfs attributes to get information
+ from CMA.
+
config CMA_AREAS
int "Maximum count of the CMA areas"
depends on CMA
@@ -760,6 +751,9 @@ config IDLE_PAGE_TRACKING
See Documentation/admin-guide/mm/idle_page_tracking.rst for
more details.
+config ARCH_HAS_CACHE_LINE_SIZE
+ bool
+
config ARCH_HAS_PTE_DEVMAP
bool
@@ -872,4 +866,7 @@ config MAPPING_DIRTY_HELPERS
config KMAP_LOCAL
bool
+# struct io_mapping based helper. Selected by drivers that need them
+config IO_MAPPING
+ bool
endmenu
diff --git a/mm/Makefile b/mm/Makefile
index 72227b24a616..bf71e295e9f6 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -58,9 +58,13 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
page-alloc-y := page_alloc.o
page-alloc-$(CONFIG_SHUFFLE_PAGE_ALLOCATOR) += shuffle.o
+# Give 'memory_hotplug' its own module-parameter namespace
+memory-hotplug-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o
+
obj-y += page-alloc.o
obj-y += init-mm.o
obj-y += memblock.o
+obj-y += $(memory-hotplug-y)
ifdef CONFIG_MMU
obj-$(CONFIG_ADVISE_SYSCALLS) += madvise.o
@@ -83,7 +87,6 @@ obj-$(CONFIG_SLUB) += slub.o
obj-$(CONFIG_KASAN) += kasan/
obj-$(CONFIG_KFENCE) += kfence/
ob