^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) menu "Memory Management options"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) config SELECT_MEMORY_MODEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) depends on ARCH_SELECT_MEMORY_MODEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) prompt "Memory model"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) depends on SELECT_MEMORY_MODEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) default FLATMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) This option allows you to change some of the ways that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Linux manages its memory internally. Most users will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) only have one option here selected by the architecture
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) configuration. This is normal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) config FLATMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) bool "Flat Memory"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || ARCH_FLATMEM_ENABLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) This option is best suited for non-NUMA systems with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) flat address space. The FLATMEM is the most efficient
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) system in terms of performance and resource consumption
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) and it is the best option for smaller systems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) For systems that have holes in their physical address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) spaces and for features like NUMA and memory hotplug,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) choose "Sparse Memory".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) If unsure, choose this option (Flat Memory) over any other.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) config DISCONTIGMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) bool "Discontiguous Memory"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) depends on ARCH_DISCONTIGMEM_ENABLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) This option provides enhanced support for discontiguous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) memory systems, over FLATMEM. These systems have holes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) in their physical address spaces, and this option provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) more efficient handling of these holes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Although "Discontiguous Memory" is still used by several
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) architectures, it is considered deprecated in favor of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) "Sparse Memory".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) If unsure, choose "Sparse Memory" over this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) config SPARSEMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) bool "Sparse Memory"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) depends on ARCH_SPARSEMEM_ENABLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) This will be the only option for some systems, including
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) memory hot-plug systems. This is normal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) This option provides efficient support for systems with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) holes is their physical address space and allows memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) hot-plug and hot-remove.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) If unsure, choose "Flat Memory" over this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) config DISCONTIGMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) config SPARSEMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) config FLATMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) depends on (!DISCONTIGMEM && !SPARSEMEM) || FLATMEM_MANUAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) config FLAT_NODE_MEM_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) depends on !SPARSEMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) # Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) # to represent different areas of memory. This variable allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) # those dependencies to exist individually.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) config NEED_MULTIPLE_NODES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) depends on DISCONTIGMEM || NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) # SPARSEMEM_EXTREME (which is the default) does some bootmem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) # allocations when sparse_init() is called. If this cannot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) # be done on your architecture, select this option. However,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) # statically allocating the mem_section[] array can potentially
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) # consume vast quantities of .bss, so be careful.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) # This option will also potentially produce smaller runtime code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) # with gcc 3.4 and later.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) config SPARSEMEM_STATIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) # Architecture platforms which require a two level mem_section in SPARSEMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) # must select this option. This is usually for architecture platforms with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) # an extremely sparse physical address space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) config SPARSEMEM_EXTREME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) depends on SPARSEMEM && !SPARSEMEM_STATIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) config SPARSEMEM_VMEMMAP_ENABLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) config SPARSEMEM_VMEMMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) bool "Sparse Memory virtual memmap"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) pfn_to_page and page_to_pfn operations. This is the most
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) efficient option when sufficient kernel resources are available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) config HAVE_MEMBLOCK_PHYS_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) config HAVE_FAST_GUP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) # Don't discard allocated memory used to track "memory" and "reserved" memblocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) # after early boot, so it can still be used to test for validity of memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) # Also, memblocks are updated with memory hot(un)plug.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) config ARCH_KEEP_MEMBLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) # Keep arch NUMA mapping infrastructure post-init.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) config NUMA_KEEP_MEMINFO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) config MEMORY_ISOLATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) # Only be set on architectures that have completely implemented memory hotplug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) # feature. If you are not sure, don't touch it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) config HAVE_BOOTMEM_INFO_NODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) # eventually, we can have this option just 'select SPARSEMEM'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) config MEMORY_HOTPLUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) bool "Allow for memory hot-add"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) select MEMORY_ISOLATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) depends on SPARSEMEM || X86_64_ACPI_NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) depends on ARCH_ENABLE_MEMORY_HOTPLUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) depends on 64BIT || BROKEN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) select NUMA_KEEP_MEMINFO if NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) config MEMORY_HOTPLUG_SPARSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) depends on SPARSEMEM && MEMORY_HOTPLUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) config MEMORY_HOTPLUG_DEFAULT_ONLINE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) bool "Online the newly added memory blocks by default"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) depends on MEMORY_HOTPLUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) This option sets the default policy setting for memory hotplug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) onlining policy (/sys/devices/system/memory/auto_online_blocks) which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) determines what happens to newly added memory regions. Policy setting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) can always be changed at runtime.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) Say Y here if you want all hot-plugged memory blocks to appear in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 'online' state by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) Say N here if you want the default policy to keep all hot-plugged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) memory blocks in 'offline' state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) config MEMORY_HOTREMOVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) bool "Allow for memory hot remove"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) depends on MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) # Heavily threaded applications may benefit from splitting the mm-wide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) # page_table_lock, so that faults on different parts of the user address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) # space can be handled with less contention: split it at this NR_CPUS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) # Default to 4 for wider testing, though 8 might be more appropriate.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) # SPARC32 allocates multiple pte tables within a single page, and therefore
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) # a per-page lock leads to problems when multiple tables need to be locked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) # at the same time (e.g. copy_page_range()).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) # DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) config SPLIT_PTLOCK_CPUS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) default "999999" if !MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) default "999999" if ARM && !CPU_CACHE_VIPT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) default "999999" if PARISC && !PA20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) default "999999" if SPARC32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) default "4"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) config ARCH_ENABLE_SPLIT_PMD_PTLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) # support for memory balloon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) config MEMORY_BALLOON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) # support for memory balloon compaction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) config BALLOON_COMPACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) bool "Allow for balloon memory compaction/migration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) depends on COMPACTION && MEMORY_BALLOON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) Memory fragmentation introduced by ballooning might reduce
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) significantly the number of 2MB contiguous memory blocks that can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) used within a guest, thus imposing performance penalties associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) with the reduced number of transparent huge pages that could be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) by the guest workload. Allowing the compaction & migration for memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) pages enlisted as being part of memory balloon devices avoids the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) scenario aforementioned and helps improving memory defragmentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) # support for memory compaction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) config COMPACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) bool "Allow for memory compaction"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) select MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) Compaction is the only memory management component to form
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) high order (larger physically contiguous) memory blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) reliably. The page allocator relies on compaction heavily and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) the lack of the feature can lead to unexpected OOM killer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) invocations for high order memory requests. You shouldn't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) disable this option unless there really is a strong reason for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) it and then we would be really interested to hear about that at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) linux-mm@kvack.org.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) # support for free page reporting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) config PAGE_REPORTING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) bool "Free page reporting"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) Free page reporting allows for the incremental acquisition of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) free pages from the buddy allocator for the purpose of reporting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) those pages to another entity, such as a hypervisor, so that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) memory can be freed within the host for other uses.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) # support for page migration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) config MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) bool "Page migration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) Allows the migration of the physical location of pages of processes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) while the virtual addresses are not changed. This is useful in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) two situations. The first is on NUMA systems to put pages nearer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) to the processors accessing. The second is when allocating huge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) pages as migration can relocate pages to satisfy a huge page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) allocation instead of reclaiming.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) config ARCH_ENABLE_HUGEPAGE_MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) config ARCH_ENABLE_THP_MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) config CONTIG_ALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) config PHYS_ADDR_T_64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) def_bool 64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) config BOUNCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) bool "Enable bounce buffers"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) Enable bounce buffers for devices that cannot access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) the full range of memory available to the CPU. Enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) by default when ZONE_DMA or HIGHMEM is selected, but you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) may say n to override this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) config VIRT_TO_BUS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) An architecture should select this if it implements the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) deprecated interface virt_to_bus(). All new architectures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) should probably not select this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) config MMU_NOTIFIER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) select SRCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) select INTERVAL_TREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) config KSM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) bool "Enable KSM for page merging"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) select XXHASH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) Enable Kernel Samepage Merging: KSM periodically scans those areas
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) of an application's address space that an app has advised may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) mergeable. When it finds pages of identical content, it replaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) the many instances by a single page with that content, so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) saving memory until one or another app needs to modify the content.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) Recommended for use with KVM, or with other duplicative applications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) See Documentation/vm/ksm.rst for more information: KSM is inactive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) until a program has madvised that an area is MADV_MERGEABLE, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) config DEFAULT_MMAP_MIN_ADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) int "Low address space to protect from user allocation"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) default 4096
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) This is the portion of low virtual memory which should be protected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) from userspace allocation. Keeping a user from writing to low pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) can help reduce the impact of kernel NULL pointer bugs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) For most ia64, ppc64 and x86 users with lots of address space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) a value of 65536 is reasonable and should cause no problems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) On arm and other archs it should not be higher than 32768.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) Programs which use vm86 functionality or have some need to map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) this low address space will need CAP_SYS_RAWIO or disable this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) protection by setting the value to 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) This value can be changed after boot using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) /proc/sys/vm/mmap_min_addr tunable.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) config ARCH_SUPPORTS_MEMORY_FAILURE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) config MEMORY_FAILURE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) depends on ARCH_SUPPORTS_MEMORY_FAILURE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) bool "Enable recovery from hardware memory errors"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) select MEMORY_ISOLATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) select RAS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) Enables code to recover from some memory failures on systems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) with MCA recovery. This allows a system to continue running
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) even when some of its memory has uncorrected errors. This requires
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) special hardware support and typically ECC memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) config HWPOISON_INJECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) tristate "HWPoison pages injector"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) select PROC_PAGE_MONITOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) config NOMMU_INITIAL_TRIM_EXCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) int "Turn on mmap() excess space trimming before booting"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) depends on !MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) default 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) The NOMMU mmap() frequently needs to allocate large contiguous chunks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) of memory on which to store mappings, but it can only ask the system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) more than it requires. To deal with this, mmap() is able to trim off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) the excess and return it to the allocator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) If trimming is enabled, the excess is trimmed off and returned to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) system allocator, which can cause extra fragmentation, particularly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) if there are a lot of transient processes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) If trimming is disabled, the excess is kept, but not used, which for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) long-term mappings means that the space is wasted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) Trimming can be dynamically controlled through a sysctl option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) excess pages there must be before trimming should occur, or zero if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) no trimming is to occur.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) This option specifies the initial value of this option. The default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) of 1 says that all excess pages should be trimmed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) config TRANSPARENT_HUGEPAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) bool "Transparent Hugepage Support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) select COMPACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) select XARRAY_MULTI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) Transparent Hugepages allows the kernel to use huge pages and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) huge tlb transparently to the applications whenever possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) This feature can improve computing performance to certain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) applications by speeding up page faults during memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) allocation, by reducing the number of tlb misses and by speeding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) up the pagetable walking.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) If memory constrained on embedded, you may want to say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) prompt "Transparent Hugepage Support sysfs defaults"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) depends on TRANSPARENT_HUGEPAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) default TRANSPARENT_HUGEPAGE_ALWAYS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) Selects the sysfs defaults for Transparent Hugepage Support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) config TRANSPARENT_HUGEPAGE_ALWAYS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) bool "always"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) Enabling Transparent Hugepage always, can increase the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) memory footprint of applications without a guaranteed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) benefit but it will work automatically for all applications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) config TRANSPARENT_HUGEPAGE_MADVISE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) bool "madvise"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) Enabling Transparent Hugepage madvise, will only provide a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) performance improvement benefit to the applications using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) madvise(MADV_HUGEPAGE) but it won't risk to increase the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) memory footprint of applications without a guaranteed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) benefit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) config ARCH_WANTS_THP_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) config THP_SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) def_bool y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) Swap transparent huge pages in one piece, without splitting.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) XXX: For now, swap cluster backing transparent huge page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) will be split after swapout.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) For selection by architectures with reasonable THP sizes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) # UP and nommu archs use km based percpu allocator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) config NEED_PER_CPU_KM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) depends on !SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) config CLEANCACHE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) bool "Enable cleancache driver to cache clean pages if tmem is present"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) Cleancache can be thought of as a page-granularity victim cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) for clean pages that the kernel's pageframe replacement algorithm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) (PFRA) would like to keep around, but can't since there isn't enough
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) memory. So when the PFRA "evicts" a page, it first attempts to use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) cleancache code to put the data contained in that page into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) "transcendent memory", memory that is not directly accessible or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) addressable by the kernel and is of unknown and possibly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) time-varying size. And when a cleancache-enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) filesystem wishes to access a page in a file on disk, it first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) checks cleancache to see if it already contains it; if it does,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) the page is copied into the kernel and a disk access is avoided.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) When a transcendent memory driver is available (such as zcache or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) Xen transcendent memory), a significant I/O reduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) may be achieved. When none is available, all cleancache calls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) are reduced to a single pointer-compare-against-NULL resulting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) in a negligible performance hit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) If unsure, say Y to enable cleancache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) config FRONTSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) bool "Enable frontswap to cache swap pages if tmem is present"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) depends on SWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) Frontswap is so named because it can be thought of as the opposite
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) of a "backing" store for a swap device. The data is stored into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) "transcendent memory", memory that is not directly accessible or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) addressable by the kernel and is of unknown and possibly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) time-varying size. When space in transcendent memory is available,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) a significant swap I/O reduction may be achieved. When none is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) available, all frontswap calls are reduced to a single pointer-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) compare-against-NULL resulting in a negligible performance hit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) and swap data is stored as normal on the matching swap device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) If unsure, say Y to enable frontswap.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) config CMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) bool "Contiguous Memory Allocator"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) select MIGRATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) select MEMORY_ISOLATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) This enables the Contiguous Memory Allocator which allows other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) subsystems to allocate big physically-contiguous blocks of memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) CMA reserves a region of memory and allows only movable pages to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) be allocated from it. This way, the kernel can use the memory for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) pagecache and when a subsystem requests for contiguous area, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) allocated pages are migrated away to serve the contiguous request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) If unsure, say "n".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) config CMA_INACTIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) bool "CMA not active to system"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) depends on CMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) This forbids the CMA to active its pages to system memory, to keep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) page from CMA never be borrowed by system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) If unsure, say "n".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) config CMA_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) bool "CMA debug messages (DEVELOPMENT)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) depends on DEBUG_KERNEL && CMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) Turns on debug messages in CMA. This produces KERN_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) messages for every CMA call as well as various messages while
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) processing calls such as dma_alloc_from_contiguous().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) This option does not affect warning and error messages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) config CMA_DEBUGFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) bool "CMA debugfs interface"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) depends on CMA && DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) Turns on the DebugFS interface for CMA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) config CMA_DEBUGFS_BITMAP_HEX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) bool "CMA debugfs add bitmap_hex node"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) depends on CMA_DEBUGFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) Turns on the bitmap_hex node under DEBUGFS, shows the bitmap in hex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) config CMA_SYSFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) bool "CMA information through sysfs interface"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) depends on CMA && SYSFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) This option exposes some sysfs attributes to get information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) from CMA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) config CMA_AREAS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) int "Maximum count of the CMA areas"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) depends on CMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) default 19 if NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) default 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) CMA allows to create CMA areas for particular purpose, mainly,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) used as device private area. This parameter sets the maximum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) number of CMA area in the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) If unsure, leave the default value "7" in UMA and "19" in NUMA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) config MEM_SOFT_DIRTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) bool "Track memory changes"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) select PROC_PAGE_MONITOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) This option enables memory changes tracking by introducing a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) soft-dirty bit on pte-s. This bit it set when someone writes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) into a page just as regular dirty bit, but unlike the latter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) it can be cleared by hands.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) See Documentation/admin-guide/mm/soft-dirty.rst for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) config ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) bool "Compressed cache for swap pages (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) depends on FRONTSWAP && CRYPTO=y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) select ZPOOL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) A lightweight compressed cache for swap pages. It takes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) pages that are in the process of being swapped out and attempts to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) compress them into a dynamically allocated RAM-based memory pool.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) This can result in a significant I/O reduction on swap device and,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) in the case where decompressing from RAM is faster that swap device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) reads, can also improve workload performance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) This is marked experimental because it is a new feature (as of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) v3.11) that interacts heavily with memory reclaim. While these
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) interactions don't cause any known issues on simple memory setups,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) they have not be fully explored on the large set of potential
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) configurations and workloads that exist.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) prompt "Compressed cache for swap pages default compressor"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) depends on ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) default ZSWAP_COMPRESSOR_DEFAULT_LZO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) Selects the default compression algorithm for the compressed cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) for swap pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) For an overview what kind of performance can be expected from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) a particular compression algorithm please refer to the benchmarks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) available at the following LWN page:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) https://lwn.net/Articles/751795/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) If in doubt, select 'LZO'.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) The selection made here can be overridden by using the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) command line 'zswap.compressor=' option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) bool "Deflate"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) select CRYPTO_DEFLATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) Use the Deflate algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) config ZSWAP_COMPRESSOR_DEFAULT_LZO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) bool "LZO"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) select CRYPTO_LZO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) Use the LZO algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) config ZSWAP_COMPRESSOR_DEFAULT_842
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) bool "842"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) select CRYPTO_842
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) Use the 842 algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) config ZSWAP_COMPRESSOR_DEFAULT_LZ4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) bool "LZ4"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) select CRYPTO_LZ4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) Use the LZ4 algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) config ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) bool "LZ4HC"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) select CRYPTO_LZ4HC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) Use the LZ4HC algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) config ZSWAP_COMPRESSOR_DEFAULT_ZSTD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) bool "zstd"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) select CRYPTO_ZSTD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) Use the zstd algorithm as the default compression algorithm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) config ZSWAP_COMPRESSOR_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) depends on ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) default ""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) prompt "Compressed cache for swap pages default allocator"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) depends on ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) default ZSWAP_ZPOOL_DEFAULT_ZBUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) Selects the default allocator for the compressed cache for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) swap pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) The default is 'zbud' for compatibility, however please do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) read the description of each of the allocators below before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) making a right choice.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) The selection made here can be overridden by using the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) command line 'zswap.zpool=' option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) config ZSWAP_ZPOOL_DEFAULT_ZBUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) bool "zbud"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) select ZBUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) Use the zbud allocator as the default allocator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) bool "z3fold"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) select Z3FOLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) Use the z3fold allocator as the default allocator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) bool "zsmalloc"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) select ZSMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) Use the zsmalloc allocator as the default allocator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) config ZSWAP_ZPOOL_DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) depends on ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) default ""
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) config ZSWAP_DEFAULT_ON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) bool "Enable the compressed cache for swap pages by default"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) depends on ZSWAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) If selected, the compressed cache for swap pages will be enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) at boot, otherwise it will be disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) The selection made here can be overridden by using the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) command line 'zswap.enabled=' option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) config ZPOOL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) tristate "Common API for compressed memory storage"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) Compressed memory storage API. This allows using either zbud or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) zsmalloc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) config ZBUD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) tristate "Low (Up to 2x) density storage for compressed pages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) A special purpose allocator for storing compressed pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) It is designed to store up to two compressed pages per physical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) page. While this design limits storage density, it has simple and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) deterministic reclaim properties that make it preferable to a higher
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) density approach when reclaim will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) config Z3FOLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) tristate "Up to 3x density storage for compressed pages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) depends on ZPOOL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) A special purpose allocator for storing compressed pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) It is designed to store up to three compressed pages per physical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) page. It is a ZBUD derivative so the simplicity and determinism are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) still there.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) config ZSMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) tristate "Memory allocator for compressed pages"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) zsmalloc is a slab-based memory allocator designed to store
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) compressed RAM pages. zsmalloc uses virtual memory mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) in order to reduce fragmentation. However, this results in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) non-standard allocator interface where a handle, not a pointer, is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) returned by an alloc(). This handle must be mapped in order to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) access the allocated space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733) config ZSMALLOC_STAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) bool "Export zsmalloc statistics"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) depends on ZSMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) select DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) This option enables code in the zsmalloc to collect various
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) statistics about whats happening in zsmalloc and exports that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) information to userspace via debugfs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) config GENERIC_EARLY_IOREMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746) config MAX_STACK_SIZE_MB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) int "Maximum user stack size for 32-bit processes (MB)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) default 80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749) range 8 2048
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) depends on STACK_GROWSUP && (!64BIT || COMPAT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) This is the maximum stack size in Megabytes in the VM layout of 32-bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) user processes when the stack grows upwards (currently only on parisc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) arch). The stack will be located at the highest memory address minus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) the given value, unless the RLIMIT_STACK hard limit is changed to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) smaller value in which case that is used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) A sane initial value is 80 MB.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) config DEFERRED_STRUCT_PAGE_INIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) bool "Defer initialisation of struct pages to kthreads"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) depends on SPARSEMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) depends on !NEED_PER_CPU_KM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) depends on 64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) select PADATA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) Ordinarily all struct pages are initialised during early boot in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) single thread. On very large machines this can take a considerable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) amount of time. If this option is set, large machines will bring up
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) a subset of memmap at boot and then initialise the rest in parallel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) This has a potential performance impact on tasks running early in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) lifetime of the system until these kthreads finish the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) initialisation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) config PAGE_IDLE_FLAG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) select PAGE_EXTENSION if !64BIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) bit writers can set the state of the bit in the flags so that PTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) Accessed bit readers may avoid disturbance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) config IDLE_PAGE_TRACKING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) bool "Enable idle page tracking"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) depends on SYSFS && MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) select PAGE_IDLE_FLAG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) This feature allows to estimate the amount of user pages that have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) not been touched during a given period of time. This information can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) be useful to tune memory cgroup limits and/or for job placement
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) within a compute cluster.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) See Documentation/admin-guide/mm/idle_page_tracking.rst for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) config ARCH_HAS_PTE_DEVMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) config ZONE_DEVICE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) bool "Device memory (pmem, HMM, etc...) hotplug support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) depends on MEMORY_HOTPLUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) depends on MEMORY_HOTREMOVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) depends on SPARSEMEM_VMEMMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) depends on ARCH_HAS_PTE_DEVMAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) select XARRAY_MULTI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) Device memory hotplug support allows for establishing pmem,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) or other device driver discovered memory regions, in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) memmap. This allows pfn_to_page() lookups of otherwise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) "device-physical" addresses which is needed for using a DAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) mapping in an O_DIRECT operation, among other things.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) If FS_DAX is enabled, then say Y.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) config DEV_PAGEMAP_OPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) # Helpers to mirror range of the CPU page tables of a process into device page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821) # tables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) config HMM_MIRROR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825) depends on MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) config DEVICE_PRIVATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) bool "Unaddressable device memory (GPU memory, ...)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) depends on ZONE_DEVICE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) select DEV_PAGEMAP_OPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) Allows creation of struct pages to represent unaddressable device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) memory; i.e., memory that is only accessible from the device (or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835) group of devices). You likely also want to select HMM_MIRROR.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) config VMAP_PFN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) config FRAME_VECTOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) config ARCH_USES_HIGH_VMA_FLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845) config ARCH_HAS_PKEYS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) config PERCPU_STATS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849) bool "Collect percpu memory statistics"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851) This feature collects and exposes statistics via debugfs. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852) information includes global and per chunk statistics, which can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) be used to help understand percpu memory usage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855) config ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856) def_bool n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) config SPECULATIVE_PAGE_FAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859) bool "Speculative page faults"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861) depends on ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) depends on MMU && SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864) Try to handle user space page faults without holding the mmap_sem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) This should allow better concurrency for massively threaded process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867) since the page fault handler will not wait for other threads memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) layout change to be done, assuming that this change is done in another
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) part of the process's memory space. This type of page fault is named
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870) speculative page fault.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 872) If the speculative page fault fails because of a concurrency is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 873) detected or because underlying PMD or PTE tables are not yet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 874) allocating, it is failing its processing and a classic page fault
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 875) is then tried.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 876)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 877) config GUP_BENCHMARK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 878) bool "Enable infrastructure for get_user_pages() and related calls benchmarking"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 879) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 880) Provides /sys/kernel/debug/gup_benchmark that helps with testing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 881) performance of get_user_pages() and related calls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 882)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 883) See tools/testing/selftests/vm/gup_benchmark.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 884)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 885) config GUP_GET_PTE_LOW_HIGH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 886) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 887)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 888) config READ_ONLY_THP_FOR_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 889) bool "Read-only THP for filesystems (EXPERIMENTAL)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 890) depends on TRANSPARENT_HUGEPAGE && SHMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 891)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 892) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 893) Allow khugepaged to put read-only file-backed pages in THP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 894)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 895) This is marked experimental because it is a new feature. Write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 896) support of file THPs will be developed in the next few release
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 897) cycles.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 898)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 899) config ARCH_HAS_PTE_SPECIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 900) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 901)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 902) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 903) # Some architectures require a special hugepage directory format that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 904) # required to support multiple hugepage sizes. For example a4fe3ce76
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 905) # "powerpc/mm: Allow more flexible layouts for hugepage pagetables"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 906) # introduced it on powerpc. This allows for a more flexible hugepage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 907) # pagetable layouts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 908) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 909) config ARCH_HAS_HUGEPD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 910) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 911)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 912) config MAPPING_DIRTY_HELPERS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 913) bool
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 914)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 915) source "mm/damon/Kconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 916)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 917) endmenu