2019-05-19 13:07:45 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2018-07-31 13:39:35 +02:00
|
|
|
|
|
|
|
|
menu "Memory Management options"
|
|
|
|
|
|
2005-06-23 00:07:49 -07:00
|
|
|
config SELECT_MEMORY_MODEL
|
|
|
|
|
def_bool y
|
2013-01-16 18:54:17 -08:00
|
|
|
depends on ARCH_SELECT_MEMORY_MODEL
|
2005-06-23 00:07:49 -07:00
|
|
|
|
2005-06-23 00:07:42 -07:00
|
|
|
choice
|
|
|
|
|
prompt "Memory model"
|
2005-06-23 00:07:49 -07:00
|
|
|
depends on SELECT_MEMORY_MODEL
|
2005-06-23 00:07:54 -07:00
|
|
|
default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT
|
2005-06-23 00:07:49 -07:00
|
|
|
default FLATMEM_MANUAL
|
2019-05-13 17:23:05 -07:00
|
|
|
help
|
|
|
|
|
This option allows you to change some of the ways that
|
|
|
|
|
Linux manages its memory internally. Most users will
|
|
|
|
|
only have one option here selected by the architecture
|
|
|
|
|
configuration. This is normal.
|
2005-06-23 00:07:42 -07:00
|
|
|
|
2005-06-23 00:07:49 -07:00
|
|
|
config FLATMEM_MANUAL
|
2005-06-23 00:07:42 -07:00
|
|
|
bool "Flat Memory"
|
2021-06-28 19:42:52 -07:00
|
|
|
depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE
|
2005-06-23 00:07:42 -07:00
|
|
|
help
|
2019-05-13 17:23:05 -07:00
|
|
|
This option is best suited for non-NUMA systems with
|
|
|
|
|
flat address space. The FLATMEM is the most efficient
|
|
|
|
|
system in terms of performance and resource consumption
|
|
|
|
|
and it is the best option for smaller systems.
|
2005-06-23 00:07:42 -07:00
|
|
|
|
2019-05-13 17:23:05 -07:00
|
|
|
For systems that have holes in their physical address
|
|
|
|
|
spaces and for features like NUMA and memory hotplug,
|
2019-11-30 17:58:26 -08:00
|
|
|
choose "Sparse Memory".
|
2005-06-23 00:07:54 -07:00
|
|
|
|
|
|
|
|
If unsure, choose this option (Flat Memory) over any other.
|
2005-06-23 00:07:42 -07:00
|
|
|
|
2005-06-23 00:07:54 -07:00
|
|
|
config SPARSEMEM_MANUAL
|
|
|
|
|
bool "Sparse Memory"
|
|
|
|
|
depends on ARCH_SPARSEMEM_ENABLE
|
|
|
|
|
help
|
|
|
|
|
This will be the only option for some systems, including
|
2019-05-13 17:23:05 -07:00
|
|
|
memory hot-plug systems. This is normal.
|
2005-06-23 00:07:54 -07:00
|
|
|
|
2019-05-13 17:23:05 -07:00
|
|
|
This option provides efficient support for systems with
|
|
|
|
|
holes is their physical address space and allows memory
|
|
|
|
|
hot-plug and hot-remove.
|
2005-06-23 00:07:54 -07:00
|
|
|
|
2019-05-13 17:23:05 -07:00
|
|
|
If unsure, choose "Flat Memory" over this option.
|
2005-06-23 00:07:54 -07:00
|
|
|
|
2005-06-23 00:07:42 -07:00
|
|
|
endchoice
|
|
|
|
|
|
2005-06-23 00:07:54 -07:00
|
|
|
config SPARSEMEM
|
|
|
|
|
def_bool y
|
2009-10-26 16:50:12 -07:00
|
|
|
depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL
|
2005-06-23 00:07:54 -07:00
|
|
|
|
2005-06-23 00:07:49 -07:00
|
|
|
config FLATMEM
|
|
|
|
|
def_bool y
|
2021-06-28 19:42:52 -07:00
|
|
|
depends on !SPARSEMEM || FLATMEM_MANUAL
|
2005-06-23 00:07:54 -07:00
|
|
|
|
2005-09-03 15:54:28 -07:00
|
|
|
#
|
|
|
|
|
# SPARSEMEM_EXTREME (which is the default) does some bootmem
|
2020-08-06 23:24:02 -07:00
|
|
|
# allocations when sparse_init() is called. If this cannot
|
2005-09-03 15:54:28 -07:00
|
|
|
# be done on your architecture, select this option. However,
|
|
|
|
|
# statically allocating the mem_section[] array can potentially
|
|
|
|
|
# consume vast quantities of .bss, so be careful.
|
|
|
|
|
#
|
|
|
|
|
# This option will also potentially produce smaller runtime code
|
|
|
|
|
# with gcc 3.4 and later.
|
|
|
|
|
#
|
|
|
|
|
config SPARSEMEM_STATIC
|
2008-10-15 22:01:38 -07:00
|
|
|
bool
|
2005-09-03 15:54:28 -07:00
|
|
|
|
2005-09-03 15:54:26 -07:00
|
|
|
#
|
2006-10-03 22:34:14 +02:00
|
|
|
# Architecture platforms which require a two level mem_section in SPARSEMEM
|
2005-09-03 15:54:26 -07:00
|
|
|
# must select this option. This is usually for architecture platforms with
|
|
|
|
|
# an extremely sparse physical address space.
|
|
|
|
|
#
|
2005-09-03 15:54:28 -07:00
|
|
|
config SPARSEMEM_EXTREME
|
|
|
|
|
def_bool y
|
|
|
|
|
depends on SPARSEMEM && !SPARSEMEM_STATIC
|
2005-10-29 18:16:40 -07:00
|
|
|
|
2007-10-16 01:24:14 -07:00
|
|
|
config SPARSEMEM_VMEMMAP_ENABLE
|
2008-10-15 22:01:38 -07:00
|
|
|
bool
|
2007-10-16 01:24:14 -07:00
|
|
|
|
|
|
|
|
config SPARSEMEM_VMEMMAP
|
2007-12-17 16:19:53 -08:00
|
|
|
bool "Sparse Memory virtual memmap"
|
|
|
|
|
depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE
|
|
|
|
|
default y
|
|
|
|
|
help
|
2019-11-30 17:58:23 -08:00
|
|
|
SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
|
|
|
|
|
pfn_to_page and page_to_pfn operations. This is the most
|
|
|
|
|
efficient option when sufficient kernel resources are available.
|
2007-10-16 01:24:14 -07:00
|
|
|
|
2014-01-29 18:16:01 +01:00
|
|
|
config HAVE_MEMBLOCK_PHYS_MAP
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2014-01-29 18:16:01 +01:00
|
|
|
|
2019-07-11 20:57:14 -07:00
|
|
|
config HAVE_FAST_GUP
|
2019-07-11 20:57:21 -07:00
|
|
|
depends on MMU
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2014-10-09 15:29:14 -07:00
|
|
|
|
2020-06-04 16:48:38 -07:00
|
|
|
# Don't discard allocated memory used to track "memory" and "reserved" memblocks
|
|
|
|
|
# after early boot, so it can still be used to test for validity of memory.
|
|
|
|
|
# Also, memblocks are updated with memory hot(un)plug.
|
2019-05-13 17:22:59 -07:00
|
|
|
config ARCH_KEEP_MEMBLOCK
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2011-07-14 11:46:03 +02:00
|
|
|
|
2020-02-16 12:01:04 -08:00
|
|
|
# Keep arch NUMA mapping infrastructure post-init.
|
|
|
|
|
config NUMA_KEEP_MEMINFO
|
|
|
|
|
bool
|
|
|
|
|
|
2012-07-31 16:43:50 -07:00
|
|
|
config MEMORY_ISOLATION
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2012-07-31 16:43:50 -07:00
|
|
|
|
2021-11-08 18:35:50 -08:00
|
|
|
# IORESOURCE_SYSTEM_RAM regions in the kernel resource tree that are marked
|
|
|
|
|
# IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via
|
|
|
|
|
# /dev/mem.
|
|
|
|
|
config EXCLUSIVE_SYSTEM_RAM
|
|
|
|
|
def_bool y
|
|
|
|
|
depends on !DEVMEM || STRICT_DEVMEM
|
|
|
|
|
|
2013-02-22 16:33:00 -08:00
|
|
|
#
|
|
|
|
|
# Only be set on architectures that have completely implemented memory hotplug
|
|
|
|
|
# feature. If you are not sure, don't touch it.
|
|
|
|
|
#
|
|
|
|
|
config HAVE_BOOTMEM_INFO_NODE
|
|
|
|
|
def_bool n
|
|
|
|
|
|
2021-05-04 18:38:17 -07:00
|
|
|
config ARCH_ENABLE_MEMORY_HOTPLUG
|
|
|
|
|
bool
|
|
|
|
|
|
2005-10-29 18:16:54 -07:00
|
|
|
# eventually, we can have this option just 'select SPARSEMEM'
|
|
|
|
|
config MEMORY_HOTPLUG
|
|
|
|
|
bool "Allow for memory hot-add"
|
2020-10-15 20:08:23 -07:00
|
|
|
select MEMORY_ISOLATION
|
2021-11-05 13:44:20 -07:00
|
|
|
depends on SPARSEMEM
|
2013-05-21 13:49:35 +10:00
|
|
|
depends on ARCH_ENABLE_MEMORY_HOTPLUG
|
2021-11-05 13:44:28 -07:00
|
|
|
depends on 64BIT
|
2020-02-16 12:01:04 -08:00
|
|
|
select NUMA_KEEP_MEMINFO if NUMA
|
2005-10-29 18:16:54 -07:00
|
|
|
|
2016-05-19 17:13:03 -07:00
|
|
|
config MEMORY_HOTPLUG_DEFAULT_ONLINE
|
2019-11-30 17:58:23 -08:00
|
|
|
bool "Online the newly added memory blocks by default"
|
|
|
|
|
depends on MEMORY_HOTPLUG
|
|
|
|
|
help
|
2016-05-19 17:13:03 -07:00
|
|
|
This option sets the default policy setting for memory hotplug
|
|
|
|
|
onlining policy (/sys/devices/system/memory/auto_online_blocks) which
|
|
|
|
|
determines what happens to newly added memory regions. Policy setting
|
|
|
|
|
can always be changed at runtime.
|
2019-06-07 15:54:32 -03:00
|
|
|
See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
|
2016-05-19 17:13:03 -07:00
|
|
|
|
|
|
|
|
Say Y here if you want all hot-plugged memory blocks to appear in
|
|
|
|
|
'online' state by default.
|
|
|
|
|
Say N here if you want the default policy to keep all hot-plugged
|
|
|
|
|
memory blocks in 'offline' state.
|
|
|
|
|
|
2021-05-04 18:38:17 -07:00
|
|
|
config ARCH_ENABLE_MEMORY_HOTREMOVE
|
|
|
|
|
bool
|
|
|
|
|
|
2007-10-16 01:26:12 -07:00
|
|
|
config MEMORY_HOTREMOVE
|
|
|
|
|
bool "Allow for memory hot remove"
|
2013-09-27 10:18:09 -05:00
|
|
|
select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
|
2007-10-16 01:26:12 -07:00
|
|
|
depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
|
|
|
|
|
depends on MIGRATION
|
|
|
|
|
|
2021-05-04 18:39:42 -07:00
|
|
|
config MHP_MEMMAP_ON_MEMORY
|
|
|
|
|
def_bool y
|
|
|
|
|
depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP
|
|
|
|
|
depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
|
|
|
|
|
|
2005-10-29 18:16:40 -07:00
|
|
|
# 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.
|
|
|
|
|
# Default to 4 for wider testing, though 8 might be more appropriate.
|
|
|
|
|
# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
|
2005-11-23 13:37:37 -08:00
|
|
|
# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
|
2020-05-26 18:33:01 +01:00
|
|
|
# SPARC32 allocates multiple pte tables within a single page, and therefore
|
|
|
|
|
# a per-page lock leads to problems when multiple tables need to be locked
|
|
|
|
|
# at the same time (e.g. copy_page_range()).
|
2009-12-14 17:59:02 -08:00
|
|
|
# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page.
|
2005-10-29 18:16:40 -07:00
|
|
|
#
|
|
|
|
|
config SPLIT_PTLOCK_CPUS
|
|
|
|
|
int
|
2014-04-07 15:37:14 -07:00
|
|
|
default "999999" if !MMU
|
2009-12-14 17:59:02 -08:00
|
|
|
default "999999" if ARM && !CPU_CACHE_VIPT
|
|
|
|
|
default "999999" if PARISC && !PA20
|
2020-05-26 18:33:01 +01:00
|
|
|
default "999999" if SPARC32
|
2005-10-29 18:16:40 -07:00
|
|
|
default "4"
|
2006-01-08 01:00:49 -08:00
|
|
|
|
2013-11-14 14:31:07 -08:00
|
|
|
config ARCH_ENABLE_SPLIT_PMD_PTLOCK
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2013-11-14 14:31:07 -08:00
|
|
|
|
2014-10-09 15:29:32 -07:00
|
|
|
#
|
|
|
|
|
# support for memory balloon
|
|
|
|
|
config MEMORY_BALLOON
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2014-10-09 15:29:32 -07:00
|
|
|
|
2012-12-11 16:02:38 -08:00
|
|
|
#
|
|
|
|
|
# support for memory balloon compaction
|
|
|
|
|
config BALLOON_COMPACTION
|
|
|
|
|
bool "Allow for balloon memory compaction/migration"
|
|
|
|
|
def_bool y
|
2014-10-09 15:29:32 -07:00
|
|
|
depends on COMPACTION && MEMORY_BALLOON
|
2012-12-11 16:02:38 -08:00
|
|
|
help
|
|
|
|
|
Memory fragmentation introduced by ballooning might reduce
|
|
|
|
|
significantly the number of 2MB contiguous memory blocks that can be
|
|
|
|
|
used within a guest, thus imposing performance penalties associated
|
|
|
|
|
with the reduced number of transparent huge pages that could be used
|
|
|
|
|
by the guest workload. Allowing the compaction & migration for memory
|
|
|
|
|
pages enlisted as being part of memory balloon devices avoids the
|
|
|
|
|
scenario aforementioned and helps improving memory defragmentation.
|
|
|
|
|
|
2010-05-24 14:32:21 -07:00
|
|
|
#
|
|
|
|
|
# support for memory compaction
|
|
|
|
|
config COMPACTION
|
|
|
|
|
bool "Allow for memory compaction"
|
2012-10-08 16:33:03 -07:00
|
|
|
def_bool y
|
2010-05-24 14:32:21 -07:00
|
|
|
select MIGRATION
|
2011-01-25 15:07:25 -08:00
|
|
|
depends on MMU
|
2010-05-24 14:32:21 -07:00
|
|
|
help
|
2019-11-30 17:58:23 -08:00
|
|
|
Compaction is the only memory management component to form
|
|
|
|
|
high order (larger physically contiguous) memory blocks
|
|
|
|
|
reliably. The page allocator relies on compaction heavily and
|
|
|
|
|
the lack of the feature can lead to unexpected OOM killer
|
|
|
|
|
invocations for high order memory requests. You shouldn't
|
|
|
|
|
disable this option unless there really is a strong reason for
|
|
|
|
|
it and then we would be really interested to hear about that at
|
|
|
|
|
linux-mm@kvack.org.
|
2010-05-24 14:32:21 -07:00
|
|
|
|
2020-04-06 20:04:56 -07:00
|
|
|
#
|
|
|
|
|
# support for free page reporting
|
|
|
|
|
config PAGE_REPORTING
|
|
|
|
|
bool "Free page reporting"
|
|
|
|
|
def_bool n
|
|
|
|
|
help
|
|
|
|
|
Free page reporting allows for the incremental acquisition of
|
|
|
|
|
free pages from the buddy allocator for the purpose of reporting
|
|
|
|
|
those pages to another entity, such as a hypervisor, so that the
|
|
|
|
|
memory can be freed within the host for other uses.
|
|
|
|
|
|
2006-01-08 01:00:49 -08:00
|
|
|
#
|
|
|
|
|
# support for page migration
|
|
|
|
|
#
|
|
|
|
|
config MIGRATION
|
2006-03-22 00:09:12 -08:00
|
|
|
bool "Page migration"
|
2006-06-23 02:03:37 -07:00
|
|
|
def_bool y
|
2013-09-12 15:14:08 -07:00
|
|
|
depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
|
2006-03-22 00:09:12 -08:00
|
|
|
help
|
|
|
|
|
Allows the migration of the physical location of pages of processes
|
2010-05-24 14:32:21 -07:00
|
|
|
while the virtual addresses are not changed. This is useful in
|
|
|
|
|
two situations. The first is on NUMA systems to put pages nearer
|
|
|
|
|
to the processors accessing. The second is when allocating huge
|
|
|
|
|
pages as migration can relocate pages to satisfy a huge page
|
|
|
|
|
allocation instead of reclaiming.
|
2006-06-12 17:11:31 -07:00
|
|
|
|
2014-06-04 16:05:35 -07:00
|
|
|
config ARCH_ENABLE_HUGEPAGE_MIGRATION
|
2014-12-20 15:41:11 -05:00
|
|
|
bool
|
2014-06-04 16:05:35 -07:00
|
|
|
|
2017-09-08 16:10:53 -07:00
|
|
|
config ARCH_ENABLE_THP_MIGRATION
|
|
|
|
|
bool
|
|
|
|
|
|
2021-05-04 18:33:19 -07:00
|
|
|
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.
|
|
|
|
|
|
2019-05-13 17:19:00 -07:00
|
|
|
config CONTIG_ALLOC
|
2019-11-30 17:58:23 -08:00
|
|
|
def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
|
2019-05-13 17:19:00 -07:00
|
|
|
|
2008-09-11 01:31:45 -07:00
|
|
|
config PHYS_ADDR_T_64BIT
|
2018-04-03 16:24:20 +02:00
|
|
|
def_bool 64BIT
|
2008-09-11 01:31:45 -07:00
|
|
|
|
2007-07-17 04:03:37 -07:00
|
|
|
config BOUNCE
|
2013-04-29 15:08:55 -07:00
|
|
|
bool "Enable bounce buffers"
|
|
|
|
|
default y
|
2021-03-31 09:29:59 +02:00
|
|
|
depends on BLOCK && MMU && HIGHMEM
|
2013-04-29 15:08:55 -07:00
|
|
|
help
|
2021-03-31 09:29:59 +02:00
|
|
|
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.
|
2007-07-17 04:03:37 -07:00
|
|
|
|
2007-07-15 23:40:05 -07:00
|
|
|
config VIRT_TO_BUS
|
2013-03-07 15:48:16 +11:00
|
|
|
bool
|
|
|
|
|
help
|
|
|
|
|
An architecture should select this if it implements the
|
|
|
|
|
deprecated interface virt_to_bus(). All new architectures
|
|
|
|
|
should probably not select this.
|
|
|
|
|
|
2008-07-28 15:46:29 -07:00
|
|
|
|
|
|
|
|
config MMU_NOTIFIER
|
|
|
|
|
bool
|
2014-12-05 11:24:45 -05:00
|
|
|
select SRCU
|
2019-11-12 16:22:19 -04:00
|
|
|
select INTERVAL_TREE
|
2009-05-06 16:03:05 -07:00
|
|
|
|
2009-09-21 17:01:57 -07:00
|
|
|
config KSM
|
|
|
|
|
bool "Enable KSM for page merging"
|
|
|
|
|
depends on MMU
|
2018-12-28 00:34:05 -08:00
|
|
|
select XXHASH
|
2009-09-21 17:01:57 -07:00
|
|
|
help
|
|
|
|
|
Enable Kernel Samepage Merging: KSM periodically scans those areas
|
|
|
|
|
of an application's address space that an app has advised may be
|
|
|
|
|
mergeable. When it finds pages of identical content, it replaces
|
2009-12-14 17:59:34 -08:00
|
|
|
the many instances by a single page with that content, so
|
2009-09-21 17:01:57 -07:00
|
|
|
saving memory until one or another app needs to modify the content.
|
|
|
|
|
Recommended for use with KVM, or with other duplicative applications.
|
2018-03-21 21:22:47 +02:00
|
|
|
See Documentation/vm/ksm.rst for more information: KSM is inactive
|
2009-10-07 16:32:22 -07:00
|
|
|
until a program has madvised that an area is MADV_MERGEABLE, and
|
|
|
|
|
root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
|
2009-09-21 17:01:57 -07:00
|
|
|
|
2009-06-03 16:04:31 -04:00
|
|
|
config DEFAULT_MMAP_MIN_ADDR
|
2019-11-30 17:58:23 -08:00
|
|
|
int "Low address space to protect from user allocation"
|
2009-12-15 19:27:45 +00:00
|
|
|
depends on MMU
|
2019-11-30 17:58:23 -08:00
|
|
|
default 4096
|
|
|
|
|
help
|
2009-06-03 16:04:31 -04:00
|
|
|
This is the portion of low virtual memory which should be protected
|
|
|
|
|
from userspace allocation. Keeping a user from writing to low pages
|
|
|
|
|
can help reduce the impact of kernel NULL pointer bugs.
|
|
|
|
|
|
|
|
|
|
For most ia64, ppc64 and x86 users with lots of address space
|
|
|
|
|
a value of 65536 is reasonable and should cause no problems.
|
|
|
|
|
On arm and other archs it should not be higher than 32768.
|
2009-07-31 12:54:11 -04:00
|
|
|
Programs which use vm86 functionality or have some need to map
|
|
|
|
|
this low address space will need CAP_SYS_RAWIO or disable this
|
|
|
|
|
protection by setting the value to 0.
|
2009-06-03 16:04:31 -04:00
|
|
|
|
|
|
|
|
This value can be changed after boot using the
|
|
|
|
|
/proc/sys/vm/mmap_min_addr tunable.
|
|
|
|
|
|
2009-09-26 09:35:07 -07:00
|
|
|
config ARCH_SUPPORTS_MEMORY_FAILURE
|
|
|
|
|
bool
|
2009-06-03 16:04:31 -04:00
|
|
|
|
2009-09-16 11:50:15 +02:00
|
|
|
config MEMORY_FAILURE
|
|
|
|
|
depends on MMU
|
2009-09-26 09:35:07 -07:00
|
|
|
depends on ARCH_SUPPORTS_MEMORY_FAILURE
|
2009-09-16 11:50:15 +02:00
|
|
|
bool "Enable recovery from hardware memory errors"
|
2012-07-31 16:43:50 -07:00
|
|
|
select MEMORY_ISOLATION
|
2015-06-24 16:57:36 -07:00
|
|
|
select RAS
|
2009-09-16 11:50:15 +02:00
|
|
|
help
|
|
|
|
|
Enables code to recover from some memory failures on systems
|
|
|
|
|
with MCA recovery. This allows a system to continue running
|
|
|
|
|
even when some of its memory has uncorrected errors. This requires
|
|
|
|
|
special hardware support and typically ECC memory.
|
|
|
|
|
|
2009-09-16 11:50:17 +02:00
|
|
|
config HWPOISON_INJECT
|
2009-12-16 12:20:00 +01:00
|
|
|
tristate "HWPoison pages injector"
|
2009-12-21 19:56:42 +01:00
|
|
|
depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
|
2009-12-16 12:19:59 +01:00
|
|
|
select PROC_PAGE_MONITOR
|
2009-09-16 11:50:17 +02:00
|
|
|
|
2009-05-06 16:03:05 -07:00
|
|
|
config NOMMU_INITIAL_TRIM_EXCESS
|
|
|
|
|
int "Turn on mmap() excess space trimming before booting"
|
|
|
|
|
depends on !MMU
|
|
|
|
|
default 1
|
|
|
|
|
help
|
|
|
|
|
The NOMMU mmap() frequently needs to allocate large contiguous chunks
|
|
|
|
|
of memory on which to store mappings, but it can only ask the system
|
|
|
|
|
allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
|
|
|
|
|
more than it requires. To deal with this, mmap() is able to trim off
|
|
|
|
|
the excess and return it to the allocator.
|
|
|
|
|
|
|
|
|
|
If trimming is enabled, the excess is trimmed off and returned to the
|
|
|
|
|
system allocator, which can cause extra fragmentation, particularly
|
|
|
|
|
if there are a lot of transient processes.
|
|
|
|
|
|
|
|
|
|
If trimming is disabled, the excess is kept, but not used, which for
|
|
|
|
|
long-term mappings means that the space is wasted.
|
|
|
|
|
|
|
|
|
|
Trimming can be dynamically controlled through a sysctl option
|
|
|
|
|
(/proc/sys/vm/nr_trim_pages) which specifies the minimum number of
|
|
|
|
|
excess pages there must be before trimming should occur, or zero if
|
|
|
|
|
no trimming is to occur.
|
|
|
|
|
|
|
|
|
|
This option specifies the initial value of this option. The default
|
|
|
|
|
of 1 says that all excess pages should be trimmed.
|
|
|
|
|
|
2020-08-12 11:22:30 +02:00
|
|
|
See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
|
2010-09-03 18:22:48 +02:00
|
|
|
|
2011-01-13 15:46:39 -08:00
|
|
|
config TRANSPARENT_HUGEPAGE
|
2011-01-13 15:47:07 -08:00
|
|
|
bool "Transparent Hugepage Support"
|
2021-11-05 13:35:27 -07:00
|
|
|
depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE && !PREEMPT_RT
|
2011-01-13 15:47:07 -08:00
|
|
|
select COMPACTION
|
2018-09-22 16:14:30 -04:00
|
|
|
select XARRAY_MULTI
|
2011-01-13 15:46:39 -08:00
|
|
|
help
|
|
|
|
|
Transparent Hugepages allows the kernel to use huge pages and
|
|
|
|
|
huge tlb transparently to the applications whenever possible.
|
|
|
|
|
This feature can improve computing performance to certain
|
|
|
|
|
applications by speeding up page faults during memory
|
|
|
|
|
allocation, by reducing the number of tlb misses and by speeding
|
|
|
|
|
up the pagetable walking.
|
|
|
|
|
|
|
|
|
|
If memory constrained on embedded, you may want to say N.
|
|
|
|
|
|
2011-01-13 15:47:07 -08:00
|
|
|
choice
|
|
|
|
|
prompt "Transparent Hugepage Support sysfs defaults"
|
|
|
|
|
depends on TRANSPARENT_HUGEPAGE
|
|
|
|
|
default TRANSPARENT_HUGEPAGE_ALWAYS
|
|
|
|
|
help
|
|
|
|
|
Selects the sysfs defaults for Transparent Hugepage Support.
|
|
|
|
|
|
|
|
|
|
config TRANSPARENT_HUGEPAGE_ALWAYS
|
|
|
|
|
bool "always"
|
|
|
|
|
help
|
|
|
|
|
Enabling Transparent Hugepage always, can increase the
|
|
|
|
|
memory footprint of applications without a guaranteed
|
|
|
|
|
benefit but it will work automatically for all applications.
|
|
|
|
|
|
|
|
|
|
config TRANSPARENT_HUGEPAGE_MADVISE
|
|
|
|
|
bool "madvise"
|
|
|
|
|
help
|
|
|
|
|
Enabling Transparent Hugepage madvise, will only provide a
|
|
|
|
|
performance improvement benefit to the applications using
|
|
|
|
|
madvise(MADV_HUGEPAGE) but it won't risk to increase the
|
|
|
|
|
memory footprint of applications without a guaranteed
|
|
|
|
|
benefit.
|
|
|
|
|
endchoice
|
|
|
|
|
|
2017-07-06 15:37:18 -07:00
|
|
|
config ARCH_WANTS_THP_SWAP
|
2019-11-30 17:58:23 -08:00
|
|
|
def_bool n
|
2017-07-06 15:37:18 -07:00
|
|
|
|
|
|
|
|
config THP_SWAP
|
|
|
|
|
def_bool y
|
2018-08-17 15:49:41 -07:00
|
|
|
depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP
|
2017-07-06 15:37:18 -07:00
|
|
|
help
|
|
|
|
|
Swap transparent huge pages in one piece, without splitting.
|
2018-08-17 15:49:41 -07:00
|
|
|
XXX: For now, swap cluster backing transparent huge page
|
|
|
|
|
will be split after swapout.
|
2017-07-06 15:37:18 -07:00
|
|
|
|
|
|
|
|
For selection by architectures with reasonable THP sizes.
|
|
|
|
|
|
2010-09-03 18:22:48 +02:00
|
|
|
#
|
|
|
|
|
# UP and nommu archs use km based percpu allocator
|
|
|
|
|
#
|
|
|
|
|
config NEED_PER_CPU_KM
|
2021-11-30 17:29:54 +00:00
|
|
|
depends on !SMP || !MMU
|
2010-09-03 18:22:48 +02:00
|
|
|
bool
|
|
|
|
|
default y
|
2011-05-26 10:01:36 -06:00
|
|
|
|
|
|
|
|
config CLEANCACHE
|
|
|
|
|
bool "Enable cleancache driver to cache clean pages if tmem is present"
|
|
|
|
|
help
|
|
|
|
|
Cleancache can be thought of as a page-granularity victim cache
|
|
|
|
|
for clean pages that the kernel's pageframe replacement algorithm
|
|
|
|
|
(PFRA) would like to keep around, but can't since there isn't enough
|
|
|
|
|
memory. So when the PFRA "evicts" a page, it first attempts to use
|
2011-06-10 03:57:26 +00:00
|
|
|
cleancache code to put the data contained in that page into
|
2011-05-26 10:01:36 -06:00
|
|
|
"transcendent memory", memory that is not directly accessible or
|
|
|
|
|
addressable by the kernel and is of unknown and possibly
|
|
|
|
|
time-varying size. And when a cleancache-enabled
|
|
|
|
|
filesystem wishes to access a page in a file on disk, it first
|
|
|
|
|
checks cleancache to see if it already contains it; if it does,
|
|
|
|
|
the page is copied into the kernel and a disk access is avoided.
|
|
|
|
|
When a transcendent memory driver is available (such as zcache or
|
|
|
|
|
Xen transcendent memory), a significant I/O reduction
|
|
|
|
|
may be achieved. When none is available, all cleancache calls
|
|
|
|
|
are reduced to a single pointer-compare-against-NULL resulting
|
|
|
|
|
in a negligible performance hit.
|
|
|
|
|
|
|
|
|
|
If unsure, say Y to enable cleancache
|
2012-04-09 17:10:34 -06:00
|
|
|
|
|
|
|
|
config FRONTSWAP
|
|
|
|
|
bool "Enable frontswap to cache swap pages if tmem is present"
|
|
|
|
|
depends on SWAP
|
|
|
|
|
help
|
|
|
|
|
Frontswap is so named because it can be thought of as the opposite
|
|
|
|
|
of a "backing" store for a swap device. The data is stored into
|
|
|
|
|
"transcendent memory", memory that is not directly accessible or
|
|
|
|
|
addressable by the kernel and is of unknown and possibly
|
|
|
|
|
time-varying size. When space in transcendent memory is available,
|
|
|
|
|
a significant swap I/O reduction may be achieved. When none is
|
|
|
|
|
available, all frontswap calls are reduced to a single pointer-
|
|
|
|
|
compare-against-NULL resulting in a negligible performance hit
|
|
|
|
|
and swap data is stored as normal on the matching swap device.
|
|
|
|
|
|
|
|
|
|
If unsure, say Y to enable frontswap.
|
2013-07-02 11:15:15 +05:30
|
|
|
|
|
|
|
|
config CMA
|
|
|
|
|
bool "Contiguous Memory Allocator"
|
2018-10-30 15:07:44 -07:00
|
|
|
depends on MMU
|
2013-07-02 11:15:15 +05:30
|
|
|
select MIGRATION
|
|
|
|
|
select MEMORY_ISOLATION
|
|
|
|
|
help
|
|
|
|
|
This enables the Contiguous Memory Allocator which allows other
|
|
|
|
|
subsystems to allocate big physically-contiguous blocks of memory.
|
|
|
|
|
CMA reserves a region of memory and allows only movable pages to
|
|
|
|
|
be allocated from it. This way, the kernel can use the memory for
|
|
|
|
|
pagecache and when a subsystem requests for contiguous area, the
|
|
|
|
|
allocated pages are migrated away to serve the contiguous request.
|
|
|
|
|
|
|
|
|
|
If unsure, say "n".
|
|
|
|
|
|
|
|
|
|
config CMA_DEBUG
|
|
|
|
|
bool "CMA debug messages (DEVELOPMENT)"
|
|
|
|
|
depends on DEBUG_KERNEL && CMA
|
|
|
|
|
help
|
|
|
|
|
Turns on debug messages in CMA. This produces KERN_DEBUG
|
|
|
|
|
messages for every CMA call as well as various messages while
|
|
|
|
|
processing calls such as dma_alloc_from_contiguous().
|
|
|
|
|
This option does not affect warning and error messages.
|
2013-08-29 00:41:59 +02:00
|
|
|
|
2015-04-14 15:44:57 -07:00
|
|
|
config CMA_DEBUGFS
|
|
|
|
|
bool "CMA debugfs interface"
|
|
|
|
|
depends on CMA && DEBUG_FS
|
|
|
|
|
help
|
|
|
|
|
Turns on the DebugFS interface for CMA.
|
|
|
|
|
|
2021-05-04 18:37:28 -07:00
|
|
|
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.
|
|
|
|
|
|
2014-08-06 16:05:25 -07:00
|
|
|
config CMA_AREAS
|
|
|
|
|
int "Maximum count of the CMA areas"
|
|
|
|
|
depends on CMA
|
2020-08-24 11:03:07 +12:00
|
|
|
default 19 if NUMA
|
2014-08-06 16:05:25 -07:00
|
|
|
default 7
|
|
|
|
|
help
|
|
|
|
|
CMA allows to create CMA areas for particular purpose, mainly,
|
|
|
|
|
used as device private area. This parameter sets the maximum
|
|
|
|
|
number of CMA area in the system.
|
|
|
|
|
|
2020-08-24 11:03:07 +12:00
|
|
|
If unsure, leave the default value "7" in UMA and "19" in NUMA.
|
2014-08-06 16:05:25 -07:00
|
|
|
|
2014-08-06 16:08:36 -07:00
|
|
|
config MEM_SOFT_DIRTY
|
|
|
|
|
bool "Track memory changes"
|
|
|
|
|
depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
|
|
|
|
|
select PROC_PAGE_MONITOR
|
2013-07-10 16:04:55 -07:00
|
|
|
help
|
2014-08-06 16:08:36 -07:00
|
|
|
This option enables memory changes tracking by introducing a
|
|
|
|
|
soft-dirty bit on pte-s. This bit it set when someone writes
|
|
|
|
|
into a page just as regular dirty bit, but unlike the latter
|
|
|
|
|
it can be cleared by hands.
|
|
|
|
|
|
2018-04-18 11:07:49 +03:00
|
|
|
See Documentation/admin-guide/mm/soft-dirty.rst for more details.
|
2013-07-10 16:04:55 -07:00
|
|
|
|
2013-07-10 16:05:03 -07:00
|
|
|
config ZSWAP
|
|
|
|
|
bool "Compressed cache for swap pages (EXPERIMENTAL)"
|
|
|
|
|
depends on FRONTSWAP && CRYPTO=y
|
2014-08-06 16:08:40 -07:00
|
|
|
select ZPOOL
|
2013-07-10 16:05:03 -07:00
|
|
|
help
|
|
|
|
|
A lightweight compressed cache for swap pages. It takes
|
|
|
|
|
pages that are in the process of being swapped out and attempts to
|
|
|
|
|
compress them into a dynamically allocated RAM-based memory pool.
|
|
|
|
|
This can result in a significant I/O reduction on swap device and,
|
|
|
|
|
in the case where decompressing from RAM is faster that swap device
|
|
|
|
|
reads, can also improve workload performance.
|
|
|
|
|
|
|
|
|
|
This is marked experimental because it is a new feature (as of
|
|
|
|
|
v3.11) that interacts heavily with memory reclaim. While these
|
|
|
|
|
interactions don't cause any known issues on simple memory setups,
|
|
|
|
|
they have not be fully explored on the large set of potential
|
|
|
|
|
configurations and workloads that exist.
|
|
|
|
|
|
2020-04-06 20:08:03 -07:00
|
|
|
choice
|
|
|
|
|
prompt "Compressed cache for swap pages default compressor"
|
|
|
|
|
depends on ZSWAP
|
|
|
|
|
default ZSWAP_COMPRESSOR_DEFAULT_LZO
|
|
|
|
|
help
|
|
|
|
|
Selects the default compression algorithm for the compressed cache
|
|
|
|
|
for swap pages.
|
|
|
|
|
|
|
|
|
|
For an overview what kind of performance can be expected from
|
|
|
|
|
a particular compression algorithm please refer to the benchmarks
|
|
|
|
|
available at the following LWN page:
|
|
|
|
|
https://lwn.net/Articles/751795/
|
|
|
|
|
|
|
|
|
|
If in doubt, select 'LZO'.
|
|
|
|
|
|
|
|
|
|
The selection made here can be overridden by using the kernel
|
|
|
|
|
command line 'zswap.compressor=' option.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
|
|
|
|
|
bool "Deflate"
|
|
|
|
|
select CRYPTO_DEFLATE
|
|
|
|
|
help
|
|
|
|
|
Use the Deflate algorithm as the default compression algorithm.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_LZO
|
|
|
|
|
bool "LZO"
|
|
|
|
|
select CRYPTO_LZO
|
|
|
|
|
help
|
|
|
|
|
Use the LZO algorithm as the default compression algorithm.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_842
|
|
|
|
|
bool "842"
|
|
|
|
|
select CRYPTO_842
|
|
|
|
|
help
|
|
|
|
|
Use the 842 algorithm as the default compression algorithm.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_LZ4
|
|
|
|
|
bool "LZ4"
|
|
|
|
|
select CRYPTO_LZ4
|
|
|
|
|
help
|
|
|
|
|
Use the LZ4 algorithm as the default compression algorithm.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
|
|
|
|
|
bool "LZ4HC"
|
|
|
|
|
select CRYPTO_LZ4HC
|
|
|
|
|
help
|
|
|
|
|
Use the LZ4HC algorithm as the default compression algorithm.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT_ZSTD
|
|
|
|
|
bool "zstd"
|
|
|
|
|
select CRYPTO_ZSTD
|
|
|
|
|
help
|
|
|
|
|
Use the zstd algorithm as the default compression algorithm.
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
|
|
config ZSWAP_COMPRESSOR_DEFAULT
|
|
|
|
|
string
|
|
|
|
|
depends on ZSWAP
|
|
|
|
|
default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
|
|
|
|
|
default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
|
|
|
|
|
default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
|
|
|
|
|
default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
|
|
|
|
|
default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
|
|
|
|
|
default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
|
|
|
|
|
default ""
|
|
|
|
|
|
|
|
|
|
choice
|
|
|
|
|
prompt "Compressed cache for swap pages default allocator"
|
|
|
|
|
depends on ZSWAP
|
|
|
|
|
default ZSWAP_ZPOOL_DEFAULT_ZBUD
|
|
|
|
|
help
|
|
|
|
|
Selects the default allocator for the compressed cache for
|
|
|
|
|
swap pages.
|
|
|
|
|
The default is 'zbud' for compatibility, however please do
|
|
|
|
|
read the description of each of the allocators below before
|
|
|
|
|
making a right choice.
|
|
|
|
|
|
|
|
|
|
The selection made here can be overridden by using the kernel
|
|
|
|
|
command line 'zswap.zpool=' option.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_ZPOOL_DEFAULT_ZBUD
|
|
|
|
|
bool "zbud"
|
|
|
|
|
select ZBUD
|
|
|
|
|
help
|
|
|
|
|
Use the zbud allocator as the default allocator.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
|
|
|
|
|
bool "z3fold"
|
|
|
|
|
select Z3FOLD
|
|
|
|
|
help
|
|
|
|
|
Use the z3fold allocator as the default allocator.
|
|
|
|
|
|
|
|
|
|
config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
|
|
|
|
|
bool "zsmalloc"
|
|
|
|
|
select ZSMALLOC
|
|
|
|
|
help
|
|
|
|
|
Use the zsmalloc allocator as the default allocator.
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
|
|
config ZSWAP_ZPOOL_DEFAULT
|
|
|
|
|
string
|
|
|
|
|
depends on ZSWAP
|
|
|
|
|
default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
|
|
|
|
|
default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
|
|
|
|
|
default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
|
|
|
|
|
default ""
|
|
|
|
|
|
|
|
|
|
config ZSWAP_DEFAULT_ON
|
|
|
|
|
bool "Enable the compressed cache for swap pages by default"
|
|
|
|
|
depends on ZSWAP
|
|
|
|
|
help
|
|
|
|
|
If selected, the compressed cache for swap pages will be enabled
|
|
|
|
|
at boot, otherwise it will be disabled.
|
|
|
|
|
|
|
|
|
|
The selection made here can be overridden by using the kernel
|
|
|
|
|
command line 'zswap.enabled=' option.
|
|
|
|
|
|
2014-08-06 16:08:36 -07:00
|
|
|
config ZPOOL
|
|
|
|
|
tristate "Common API for compressed memory storage"
|
2013-07-03 15:01:20 -07:00
|
|
|
help
|
2014-08-06 16:08:36 -07:00
|
|
|
Compressed memory storage API. This allows using either zbud or
|
|
|
|
|
zsmalloc.
|
2013-07-03 15:01:20 -07:00
|
|
|
|
2014-08-06 16:08:36 -07:00
|
|
|
config ZBUD
|
2016-05-20 16:58:30 -07:00
|
|
|
tristate "Low (Up to 2x) density storage for compressed pages"
|
2021-06-30 18:50:45 -07:00
|
|
|
depends on ZPOOL
|
2014-08-06 16:08:36 -07:00
|
|
|
help
|
|
|
|
|
A special purpose allocator for storing compressed pages.
|
|
|
|
|
It is designed to store up to two compressed pages per physical
|
|
|
|
|
page. While this design limits storage density, it has simple and
|
|
|
|
|
deterministic reclaim properties that make it preferable to a higher
|
|
|
|
|
density approach when reclaim will be used.
|
2014-01-30 15:45:50 -08:00
|
|
|
|
2016-05-20 16:58:30 -07:00
|
|
|
config Z3FOLD
|
|
|
|
|
tristate "Up to 3x density storage for compressed pages"
|
|
|
|
|
depends on ZPOOL
|
|
|
|
|
help
|
|
|
|
|
A special purpose allocator for storing compressed pages.
|
|
|
|
|
It is designed to store up to three compressed pages per physical
|
|
|
|
|
page. It is a ZBUD derivative so the simplicity and determinism are
|
|
|
|
|
still there.
|
|
|
|
|
|
2014-01-30 15:45:50 -08:00
|
|
|
config ZSMALLOC
|
2014-06-04 16:11:10 -07:00
|
|
|
tristate "Memory allocator for compressed pages"
|
2014-01-30 15:45:50 -08:00
|
|
|
depends on MMU
|
|
|
|
|
help
|
|
|
|
|
zsmalloc is a slab-based memory allocator designed to store
|
|
|
|
|
compressed RAM pages. zsmalloc uses virtual memory mapping
|
|
|
|
|
in order to reduce fragmentation. However, this results in a
|
|
|
|
|
non-standard allocator interface where a handle, not a pointer, is
|
|
|
|
|
returned by an alloc(). This handle must be mapped in order to
|
|
|
|
|
access the allocated space.
|
|
|
|
|
|
2015-02-12 15:00:54 -08:00
|
|
|
config ZSMALLOC_STAT
|
|
|
|
|
bool "Export zsmalloc statistics"
|
|
|
|
|
depends on ZSMALLOC
|
|
|
|
|
select DEBUG_FS
|
|
|
|
|
help
|
|
|
|
|
This option enables code in the zsmalloc to collect various
|
2020-12-18 14:05:32 -08:00
|
|
|
statistics about what's happening in zsmalloc and exports that
|
2015-02-12 15:00:54 -08:00
|
|
|
information to userspace via debugfs.
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
|
2014-04-07 15:39:48 -07:00
|
|
|
config GENERIC_EARLY_IOREMAP
|
|
|
|
|
bool
|
2014-04-30 23:26:02 +02:00
|
|
|
|
2020-11-06 19:41:36 +01:00
|
|
|
config STACK_MAX_DEFAULT_SIZE_MB
|
|
|
|
|
int "Default maximum user stack size for 32-bit processes (MB)"
|
|
|
|
|
default 100
|
2014-04-30 23:26:02 +02:00
|
|
|
range 8 2048
|
|
|
|
|
depends on STACK_GROWSUP && (!64BIT || COMPAT)
|
|
|
|
|
help
|
|
|
|
|
This is the maximum stack size in Megabytes in the VM layout of 32-bit
|
|
|
|
|
user processes when the stack grows upwards (currently only on parisc
|
2020-11-06 19:41:36 +01:00
|
|
|
arch) when the RLIMIT_STACK hard limit is unlimited.
|
2014-04-30 23:26:02 +02:00
|
|
|
|
2020-11-06 19:41:36 +01:00
|
|
|
A sane initial value is 100 MB.
|
2015-06-30 14:57:02 -07:00
|
|
|
|
|
|
|
|
config DEFERRED_STRUCT_PAGE_INIT
|
2016-02-05 15:36:21 -08:00
|
|
|
bool "Defer initialisation of struct pages to kthreads"
|
2018-08-17 15:47:07 -07:00
|
|
|
depends on SPARSEMEM
|
2018-05-18 16:09:13 -07:00
|
|
|
depends on !NEED_PER_CPU_KM
|
2018-09-20 12:22:30 -07:00
|
|
|
depends on 64BIT
|
2020-06-03 15:59:51 -07:00
|
|
|
select PADATA
|
2015-06-30 14:57:02 -07:00
|
|
|
help
|
|
|
|
|
Ordinarily all struct pages are initialised during early boot in a
|
|
|
|
|
single thread. On very large machines this can take a considerable
|
|
|
|
|
amount of time. If this option is set, large machines will bring up
|
2020-06-03 15:59:51 -07:00
|
|
|
a subset of memmap at boot and then initialise the rest in parallel.
|
|
|
|
|
This has a potential performance impact on tasks running early in the
|
2016-02-05 15:36:21 -08:00
|
|
|
lifetime of the system until these kthreads finish the
|
|
|
|
|
initialisation.
|
2015-08-09 15:29:06 -04:00
|
|
|
|
2021-09-07 19:56:40 -07:00
|
|
|
config PAGE_IDLE_FLAG
|
|
|
|
|
bool
|
|
|
|
|
select PAGE_EXTENSION if !64BIT
|
|
|
|
|
help
|
|
|
|
|
This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
|
|
|
|
|
bit writers can set the state of the bit in the flags so that PTE
|
|
|
|
|
Accessed bit readers may avoid disturbance.
|
|
|
|
|
|
2015-09-09 15:35:45 -07:00
|
|
|
config IDLE_PAGE_TRACKING
|
|
|
|
|
bool "Enable idle page tracking"
|
|
|
|
|
depends on SYSFS && MMU
|
2021-09-07 19:56:40 -07:00
|
|
|
select PAGE_IDLE_FLAG
|
2015-09-09 15:35:45 -07:00
|
|
|
help
|
|
|
|
|
This feature allows to estimate the amount of user pages that have
|
|
|
|
|
not been touched during a given period of time. This information can
|
|
|
|
|
be useful to tune memory cgroup limits and/or for job placement
|
|
|
|
|
within a compute cluster.
|
|
|
|
|
|
2018-04-18 11:07:49 +03:00
|
|
|
See Documentation/admin-guide/mm/idle_page_tracking.rst for
|
|
|
|
|
more details.
|
2015-09-09 15:35:45 -07:00
|
|
|
|
2021-05-04 18:38:09 -07:00
|
|
|
config ARCH_HAS_CACHE_LINE_SIZE
|
|
|
|
|
bool
|
|
|
|
|
|
2019-07-16 16:30:47 -07:00
|
|
|
config ARCH_HAS_PTE_DEVMAP
|
2017-06-28 11:32:31 +10:00
|
|
|
bool
|
|
|
|
|
|
2021-06-30 18:52:20 -07:00
|
|
|
config ARCH_HAS_ZONE_DMA_SET
|
|
|
|
|
bool
|
|
|
|
|
|
|
|
|
|
config ZONE_DMA
|
|
|
|
|
bool "Support DMA zone" if ARCH_HAS_ZONE_DMA_SET
|
|
|
|
|
default y if ARM64 || X86
|
|
|
|
|
|
|
|
|
|
config ZONE_DMA32
|
|
|
|
|
bool "Support DMA32 zone" if ARCH_HAS_ZONE_DMA_SET
|
|
|
|
|
depends on !X86_32
|
|
|
|
|
default y if ARM64
|
|
|
|
|
|
2015-08-09 15:29:06 -04:00
|
|
|
config ZONE_DEVICE
|
2017-09-08 16:11:43 -07:00
|
|
|
bool "Device memory (pmem, HMM, etc...) hotplug support"
|
2015-08-09 15:29:06 -04:00
|
|
|
depends on MEMORY_HOTPLUG
|
|
|
|
|
depends on MEMORY_HOTREMOVE
|
2016-03-17 14:19:58 -07:00
|
|
|
depends on SPARSEMEM_VMEMMAP
|
2019-07-16 16:30:47 -07:00
|
|
|
depends on ARCH_HAS_PTE_DEVMAP
|
2018-09-22 16:14:30 -04:00
|
|
|
select XARRAY_MULTI
|
2015-08-09 15:29:06 -04:00
|
|
|
|
|
|
|
|
help
|
|
|
|
|
Device memory hotplug support allows for establishing pmem,
|
|
|
|
|
or other device driver discovered memory regions, in the
|
|
|
|
|
memmap. This allows pfn_to_page() lookups of otherwise
|
|
|
|
|
"device-physical" addresses which is needed for using a DAX
|
|
|
|
|
mapping in an O_DIRECT operation, among other things.
|
|
|
|
|
|
|
|
|
|
If FS_DAX is enabled, then say Y.
|
2015-09-11 16:42:39 -07:00
|
|
|
|
2018-05-16 11:46:08 -07:00
|
|
|
config DEV_PAGEMAP_OPS
|
|
|
|
|
bool
|
|
|
|
|
|
2019-08-06 19:05:52 +03:00
|
|
|
#
|
|
|
|
|
# Helpers to mirror range of the CPU page tables of a process into device page
|
|
|
|
|
# tables.
|
|
|
|
|
#
|
2017-09-08 16:11:27 -07:00
|
|
|
config HMM_MIRROR
|
2019-08-06 19:05:52 +03:00
|
|
|
bool
|
2019-08-06 19:05:51 +03:00
|
|
|
depends on MMU
|
2017-09-08 16:11:27 -07:00
|
|
|
|
2017-09-08 16:11:43 -07:00
|
|
|
config DEVICE_PRIVATE
|
|
|
|
|
bool "Unaddressable device memory (GPU memory, ...)"
|
2019-06-26 14:27:22 +02:00
|
|
|
depends on ZONE_DEVICE
|
2018-05-16 11:46:08 -07:00
|
|
|
select DEV_PAGEMAP_OPS
|
2017-09-08 16:11:43 -07:00
|
|
|
|
|
|
|
|
help
|
|
|
|
|
Allows creation of struct pages to represent unaddressable device
|
|
|
|
|
memory; i.e., memory that is only accessible from the device (or
|
|
|
|
|
group of devices). You likely also want to select HMM_MIRROR.
|
|
|
|
|
|
2020-10-17 16:15:10 -07:00
|
|
|
config VMAP_PFN
|
|
|
|
|
bool
|
|
|
|
|
|
2016-02-12 13:02:08 -08:00
|
|
|
config ARCH_USES_HIGH_VMA_FLAGS
|
|
|
|
|
bool
|
2016-02-12 13:02:32 -08:00
|
|
|
config ARCH_HAS_PKEYS
|
|
|
|
|
bool
|
2017-06-19 19:28:31 -04:00
|
|
|
|
|
|
|
|
config PERCPU_STATS
|
|
|
|
|
bool "Collect percpu memory statistics"
|
|
|
|
|
help
|
|
|
|
|
This feature collects and exposes statistics via debugfs. The
|
|
|
|
|
information includes global and per chunk statistics, which can
|
|
|
|
|
be used to help understand percpu memory usage.
|
2017-11-17 15:31:22 -08:00
|
|
|
|
2020-12-14 19:05:05 -08:00
|
|
|
config GUP_TEST
|
|
|
|
|
bool "Enable infrastructure for get_user_pages()-related unit tests"
|
2020-12-14 19:05:38 -08:00
|
|
|
depends on DEBUG_FS
|
2017-11-17 15:31:22 -08:00
|
|
|
help
|
2020-12-14 19:05:05 -08:00
|
|
|
Provides /sys/kernel/debug/gup_test, which in turn provides a way
|
|
|
|
|
to make ioctl calls that can launch kernel-based unit tests for
|
|
|
|
|
the get_user_pages*() and pin_user_pages*() family of API calls.
|
2017-11-17 15:31:22 -08:00
|
|
|
|
2020-12-14 19:05:05 -08:00
|
|
|
These tests include benchmark testing of the _fast variants of
|
|
|
|
|
get_user_pages*() and pin_user_pages*(), as well as smoke tests of
|
|
|
|
|
the non-_fast variants.
|
|
|
|
|
|
2020-12-14 19:05:21 -08:00
|
|
|
There is also a sub-test that allows running dump_page() on any
|
|
|
|
|
of up to eight pages (selected by command line args) within the
|
|
|
|
|
range of user-space addresses. These pages are either pinned via
|
|
|
|
|
pin_user_pages*(), or pinned via get_user_pages*(), as specified
|
|
|
|
|
by other command line arguments.
|
|
|
|
|
|
2020-12-14 19:05:05 -08:00
|
|
|
See tools/testing/selftests/vm/gup_test.c
|
2018-06-07 17:06:08 -07:00
|
|
|
|
2020-12-14 19:05:38 -08:00
|
|
|
comment "GUP_TEST needs to have DEBUG_FS enabled"
|
|
|
|
|
depends on !GUP_TEST && !DEBUG_FS
|
2018-06-07 17:06:08 -07:00
|
|
|
|
2019-07-11 20:56:49 -07:00
|
|
|
config GUP_GET_PTE_LOW_HIGH
|
|
|
|
|
bool
|
|
|
|
|
|
2019-09-23 15:38:00 -07:00
|
|
|
config READ_ONLY_THP_FOR_FS
|
|
|
|
|
bool "Read-only THP for filesystems (EXPERIMENTAL)"
|
2020-04-06 20:04:35 -07:00
|
|
|
depends on TRANSPARENT_HUGEPAGE && SHMEM
|
2019-09-23 15:38:00 -07:00
|
|
|
|
|
|
|
|
help
|
|
|
|
|
Allow khugepaged to put read-only file-backed pages in THP.
|
|
|
|
|
|
|
|
|
|
This is marked experimental because it is a new feature. Write
|
|
|
|
|
support of file THPs will be developed in the next few release
|
|
|
|
|
cycles.
|
|
|
|
|
|
2018-06-07 17:06:08 -07:00
|
|
|
config ARCH_HAS_PTE_SPECIAL
|
|
|
|
|
bool
|
2018-07-31 13:39:35 +02:00
|
|
|
|
2019-07-11 20:57:28 -07:00
|
|
|
#
|
|
|
|
|
# Some architectures require a special hugepage directory format that is
|
|
|
|
|
# required to support multiple hugepage sizes. For example a4fe3ce76
|
|
|
|
|
# "powerpc/mm: Allow more flexible layouts for hugepage pagetables"
|
|
|
|
|
# introduced it on powerpc. This allows for a more flexible hugepage
|
|
|
|
|
# pagetable layouts.
|
|
|
|
|
#
|
|
|
|
|
config ARCH_HAS_HUGEPD
|
|
|
|
|
bool
|
|
|
|
|
|
2019-03-19 13:12:30 +01:00
|
|
|
config MAPPING_DIRTY_HELPERS
|
|
|
|
|
bool
|
|
|
|
|
|
2020-11-03 10:27:18 +01:00
|
|
|
config KMAP_LOCAL
|
|
|
|
|
bool
|
|
|
|
|
|
2021-11-19 16:43:55 -08:00
|
|
|
config KMAP_LOCAL_NON_LINEAR_PTE_ARRAY
|
|
|
|
|
bool
|
|
|
|
|
|
2021-04-29 22:57:32 -07:00
|
|
|
# struct io_mapping based helper. Selected by drivers that need them
|
|
|
|
|
config IO_MAPPING
|
|
|
|
|
bool
|
2021-07-07 18:08:03 -07:00
|
|
|
|
|
|
|
|
config SECRETMEM
|
|
|
|
|
def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED
|
|
|
|
|
|
2021-09-07 19:56:28 -07:00
|
|
|
source "mm/damon/Kconfig"
|
|
|
|
|
|
2018-07-31 13:39:35 +02:00
|
|
|
endmenu
|