1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 259e0b520SChristoph Hellwig 359e0b520SChristoph Hellwigmenu "Memory Management options" 459e0b520SChristoph Hellwig 57b42f104SJohannes Weiner# 67b42f104SJohannes Weiner# For some reason microblaze and nios2 hard code SWAP=n. Hopefully we can 77b42f104SJohannes Weiner# add proper SWAP support to them, in which case this can be remove. 87b42f104SJohannes Weiner# 97b42f104SJohannes Weinerconfig ARCH_NO_SWAP 107b42f104SJohannes Weiner bool 117b42f104SJohannes Weiner 12*519bcb79SJohannes Weinermenuconfig SWAP 137b42f104SJohannes Weiner bool "Support for paging of anonymous memory (swap)" 147b42f104SJohannes Weiner depends on MMU && BLOCK && !ARCH_NO_SWAP 157b42f104SJohannes Weiner default y 167b42f104SJohannes Weiner help 177b42f104SJohannes Weiner This option allows you to choose whether you want to have support 187b42f104SJohannes Weiner for so called swap devices or swap files in your kernel that are 197b42f104SJohannes Weiner used to provide more virtual memory than the actual RAM present 207b42f104SJohannes Weiner in your computer. If unsure say Y. 217b42f104SJohannes Weiner 22*519bcb79SJohannes Weinerconfig ZSWAP 23*519bcb79SJohannes Weiner bool "Compressed cache for swap pages (EXPERIMENTAL)" 24*519bcb79SJohannes Weiner depends on SWAP && CRYPTO=y 25*519bcb79SJohannes Weiner select FRONTSWAP 26*519bcb79SJohannes Weiner select ZPOOL 27*519bcb79SJohannes Weiner help 28*519bcb79SJohannes Weiner A lightweight compressed cache for swap pages. It takes 29*519bcb79SJohannes Weiner pages that are in the process of being swapped out and attempts to 30*519bcb79SJohannes Weiner compress them into a dynamically allocated RAM-based memory pool. 31*519bcb79SJohannes Weiner This can result in a significant I/O reduction on swap device and, 32*519bcb79SJohannes Weiner in the case where decompressing from RAM is faster that swap device 33*519bcb79SJohannes Weiner reads, can also improve workload performance. 34*519bcb79SJohannes Weiner 35*519bcb79SJohannes Weiner This is marked experimental because it is a new feature (as of 36*519bcb79SJohannes Weiner v3.11) that interacts heavily with memory reclaim. While these 37*519bcb79SJohannes Weiner interactions don't cause any known issues on simple memory setups, 38*519bcb79SJohannes Weiner they have not be fully explored on the large set of potential 39*519bcb79SJohannes Weiner configurations and workloads that exist. 40*519bcb79SJohannes Weiner 41*519bcb79SJohannes Weinerchoice 42*519bcb79SJohannes Weiner prompt "Compressed cache for swap pages default compressor" 43*519bcb79SJohannes Weiner depends on ZSWAP 44*519bcb79SJohannes Weiner default ZSWAP_COMPRESSOR_DEFAULT_LZO 45*519bcb79SJohannes Weiner help 46*519bcb79SJohannes Weiner Selects the default compression algorithm for the compressed cache 47*519bcb79SJohannes Weiner for swap pages. 48*519bcb79SJohannes Weiner 49*519bcb79SJohannes Weiner For an overview what kind of performance can be expected from 50*519bcb79SJohannes Weiner a particular compression algorithm please refer to the benchmarks 51*519bcb79SJohannes Weiner available at the following LWN page: 52*519bcb79SJohannes Weiner https://lwn.net/Articles/751795/ 53*519bcb79SJohannes Weiner 54*519bcb79SJohannes Weiner If in doubt, select 'LZO'. 55*519bcb79SJohannes Weiner 56*519bcb79SJohannes Weiner The selection made here can be overridden by using the kernel 57*519bcb79SJohannes Weiner command line 'zswap.compressor=' option. 58*519bcb79SJohannes Weiner 59*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_DEFLATE 60*519bcb79SJohannes Weiner bool "Deflate" 61*519bcb79SJohannes Weiner select CRYPTO_DEFLATE 62*519bcb79SJohannes Weiner help 63*519bcb79SJohannes Weiner Use the Deflate algorithm as the default compression algorithm. 64*519bcb79SJohannes Weiner 65*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_LZO 66*519bcb79SJohannes Weiner bool "LZO" 67*519bcb79SJohannes Weiner select CRYPTO_LZO 68*519bcb79SJohannes Weiner help 69*519bcb79SJohannes Weiner Use the LZO algorithm as the default compression algorithm. 70*519bcb79SJohannes Weiner 71*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_842 72*519bcb79SJohannes Weiner bool "842" 73*519bcb79SJohannes Weiner select CRYPTO_842 74*519bcb79SJohannes Weiner help 75*519bcb79SJohannes Weiner Use the 842 algorithm as the default compression algorithm. 76*519bcb79SJohannes Weiner 77*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4 78*519bcb79SJohannes Weiner bool "LZ4" 79*519bcb79SJohannes Weiner select CRYPTO_LZ4 80*519bcb79SJohannes Weiner help 81*519bcb79SJohannes Weiner Use the LZ4 algorithm as the default compression algorithm. 82*519bcb79SJohannes Weiner 83*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4HC 84*519bcb79SJohannes Weiner bool "LZ4HC" 85*519bcb79SJohannes Weiner select CRYPTO_LZ4HC 86*519bcb79SJohannes Weiner help 87*519bcb79SJohannes Weiner Use the LZ4HC algorithm as the default compression algorithm. 88*519bcb79SJohannes Weiner 89*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT_ZSTD 90*519bcb79SJohannes Weiner bool "zstd" 91*519bcb79SJohannes Weiner select CRYPTO_ZSTD 92*519bcb79SJohannes Weiner help 93*519bcb79SJohannes Weiner Use the zstd algorithm as the default compression algorithm. 94*519bcb79SJohannes Weinerendchoice 95*519bcb79SJohannes Weiner 96*519bcb79SJohannes Weinerconfig ZSWAP_COMPRESSOR_DEFAULT 97*519bcb79SJohannes Weiner string 98*519bcb79SJohannes Weiner depends on ZSWAP 99*519bcb79SJohannes Weiner default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE 100*519bcb79SJohannes Weiner default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO 101*519bcb79SJohannes Weiner default "842" if ZSWAP_COMPRESSOR_DEFAULT_842 102*519bcb79SJohannes Weiner default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4 103*519bcb79SJohannes Weiner default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC 104*519bcb79SJohannes Weiner default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD 105*519bcb79SJohannes Weiner default "" 106*519bcb79SJohannes Weiner 107*519bcb79SJohannes Weinerchoice 108*519bcb79SJohannes Weiner prompt "Compressed cache for swap pages default allocator" 109*519bcb79SJohannes Weiner depends on ZSWAP 110*519bcb79SJohannes Weiner default ZSWAP_ZPOOL_DEFAULT_ZBUD 111*519bcb79SJohannes Weiner help 112*519bcb79SJohannes Weiner Selects the default allocator for the compressed cache for 113*519bcb79SJohannes Weiner swap pages. 114*519bcb79SJohannes Weiner The default is 'zbud' for compatibility, however please do 115*519bcb79SJohannes Weiner read the description of each of the allocators below before 116*519bcb79SJohannes Weiner making a right choice. 117*519bcb79SJohannes Weiner 118*519bcb79SJohannes Weiner The selection made here can be overridden by using the kernel 119*519bcb79SJohannes Weiner command line 'zswap.zpool=' option. 120*519bcb79SJohannes Weiner 121*519bcb79SJohannes Weinerconfig ZSWAP_ZPOOL_DEFAULT_ZBUD 122*519bcb79SJohannes Weiner bool "zbud" 123*519bcb79SJohannes Weiner select ZBUD 124*519bcb79SJohannes Weiner help 125*519bcb79SJohannes Weiner Use the zbud allocator as the default allocator. 126*519bcb79SJohannes Weiner 127*519bcb79SJohannes Weinerconfig ZSWAP_ZPOOL_DEFAULT_Z3FOLD 128*519bcb79SJohannes Weiner bool "z3fold" 129*519bcb79SJohannes Weiner select Z3FOLD 130*519bcb79SJohannes Weiner help 131*519bcb79SJohannes Weiner Use the z3fold allocator as the default allocator. 132*519bcb79SJohannes Weiner 133*519bcb79SJohannes Weinerconfig ZSWAP_ZPOOL_DEFAULT_ZSMALLOC 134*519bcb79SJohannes Weiner bool "zsmalloc" 135*519bcb79SJohannes Weiner select ZSMALLOC 136*519bcb79SJohannes Weiner help 137*519bcb79SJohannes Weiner Use the zsmalloc allocator as the default allocator. 138*519bcb79SJohannes Weinerendchoice 139*519bcb79SJohannes Weiner 140*519bcb79SJohannes Weinerconfig ZSWAP_ZPOOL_DEFAULT 141*519bcb79SJohannes Weiner string 142*519bcb79SJohannes Weiner depends on ZSWAP 143*519bcb79SJohannes Weiner default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD 144*519bcb79SJohannes Weiner default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD 145*519bcb79SJohannes Weiner default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC 146*519bcb79SJohannes Weiner default "" 147*519bcb79SJohannes Weiner 148*519bcb79SJohannes Weinerconfig ZSWAP_DEFAULT_ON 149*519bcb79SJohannes Weiner bool "Enable the compressed cache for swap pages by default" 150*519bcb79SJohannes Weiner depends on ZSWAP 151*519bcb79SJohannes Weiner help 152*519bcb79SJohannes Weiner If selected, the compressed cache for swap pages will be enabled 153*519bcb79SJohannes Weiner at boot, otherwise it will be disabled. 154*519bcb79SJohannes Weiner 155*519bcb79SJohannes Weiner The selection made here can be overridden by using the kernel 156*519bcb79SJohannes Weiner command line 'zswap.enabled=' option. 157*519bcb79SJohannes Weiner 158*519bcb79SJohannes Weinerconfig ZPOOL 159*519bcb79SJohannes Weiner tristate "Common API for compressed memory storage" 160*519bcb79SJohannes Weiner depends on ZSWAP 161*519bcb79SJohannes Weiner help 162*519bcb79SJohannes Weiner Compressed memory storage API. This allows using either zbud or 163*519bcb79SJohannes Weiner zsmalloc. 164*519bcb79SJohannes Weiner 165*519bcb79SJohannes Weinerconfig ZBUD 166*519bcb79SJohannes Weiner tristate "Low (Up to 2x) density storage for compressed pages" 167*519bcb79SJohannes Weiner depends on ZPOOL 168*519bcb79SJohannes Weiner help 169*519bcb79SJohannes Weiner A special purpose allocator for storing compressed pages. 170*519bcb79SJohannes Weiner It is designed to store up to two compressed pages per physical 171*519bcb79SJohannes Weiner page. While this design limits storage density, it has simple and 172*519bcb79SJohannes Weiner deterministic reclaim properties that make it preferable to a higher 173*519bcb79SJohannes Weiner density approach when reclaim will be used. 174*519bcb79SJohannes Weiner 175*519bcb79SJohannes Weinerconfig Z3FOLD 176*519bcb79SJohannes Weiner tristate "Up to 3x density storage for compressed pages" 177*519bcb79SJohannes Weiner depends on ZPOOL 178*519bcb79SJohannes Weiner help 179*519bcb79SJohannes Weiner A special purpose allocator for storing compressed pages. 180*519bcb79SJohannes Weiner It is designed to store up to three compressed pages per physical 181*519bcb79SJohannes Weiner page. It is a ZBUD derivative so the simplicity and determinism are 182*519bcb79SJohannes Weiner still there. 183*519bcb79SJohannes Weiner 184*519bcb79SJohannes Weinerconfig ZSMALLOC 185*519bcb79SJohannes Weiner tristate "Memory allocator for compressed pages" 186*519bcb79SJohannes Weiner depends on MMU 187*519bcb79SJohannes Weiner help 188*519bcb79SJohannes Weiner zsmalloc is a slab-based memory allocator designed to store 189*519bcb79SJohannes Weiner compressed RAM pages. zsmalloc uses virtual memory mapping 190*519bcb79SJohannes Weiner in order to reduce fragmentation. However, this results in a 191*519bcb79SJohannes Weiner non-standard allocator interface where a handle, not a pointer, is 192*519bcb79SJohannes Weiner returned by an alloc(). This handle must be mapped in order to 193*519bcb79SJohannes Weiner access the allocated space. 194*519bcb79SJohannes Weiner 195*519bcb79SJohannes Weinerconfig ZSMALLOC_STAT 196*519bcb79SJohannes Weiner bool "Export zsmalloc statistics" 197*519bcb79SJohannes Weiner depends on ZSMALLOC 198*519bcb79SJohannes Weiner select DEBUG_FS 199*519bcb79SJohannes Weiner help 200*519bcb79SJohannes Weiner This option enables code in the zsmalloc to collect various 201*519bcb79SJohannes Weiner statistics about what's happening in zsmalloc and exports that 202*519bcb79SJohannes Weiner information to userspace via debugfs. 203*519bcb79SJohannes Weiner If unsure, say N. 204*519bcb79SJohannes Weiner 205*519bcb79SJohannes Weinermenu "SLAB allocator options" 206*519bcb79SJohannes Weiner 2077b42f104SJohannes Weinerchoice 2087b42f104SJohannes Weiner prompt "Choose SLAB allocator" 2097b42f104SJohannes Weiner default SLUB 2107b42f104SJohannes Weiner help 2117b42f104SJohannes Weiner This option allows to select a slab allocator. 2127b42f104SJohannes Weiner 2137b42f104SJohannes Weinerconfig SLAB 2147b42f104SJohannes Weiner bool "SLAB" 2157b42f104SJohannes Weiner depends on !PREEMPT_RT 2167b42f104SJohannes Weiner select HAVE_HARDENED_USERCOPY_ALLOCATOR 2177b42f104SJohannes Weiner help 2187b42f104SJohannes Weiner The regular slab allocator that is established and known to work 2197b42f104SJohannes Weiner well in all environments. It organizes cache hot objects in 2207b42f104SJohannes Weiner per cpu and per node queues. 2217b42f104SJohannes Weiner 2227b42f104SJohannes Weinerconfig SLUB 2237b42f104SJohannes Weiner bool "SLUB (Unqueued Allocator)" 2247b42f104SJohannes Weiner select HAVE_HARDENED_USERCOPY_ALLOCATOR 2257b42f104SJohannes Weiner help 2267b42f104SJohannes Weiner SLUB is a slab allocator that minimizes cache line usage 2277b42f104SJohannes Weiner instead of managing queues of cached objects (SLAB approach). 2287b42f104SJohannes Weiner Per cpu caching is realized using slabs of objects instead 2297b42f104SJohannes Weiner of queues of objects. SLUB can use memory efficiently 2307b42f104SJohannes Weiner and has enhanced diagnostics. SLUB is the default choice for 2317b42f104SJohannes Weiner a slab allocator. 2327b42f104SJohannes Weiner 2337b42f104SJohannes Weinerconfig SLOB 2347b42f104SJohannes Weiner depends on EXPERT 2357b42f104SJohannes Weiner bool "SLOB (Simple Allocator)" 2367b42f104SJohannes Weiner depends on !PREEMPT_RT 2377b42f104SJohannes Weiner help 2387b42f104SJohannes Weiner SLOB replaces the stock allocator with a drastically simpler 2397b42f104SJohannes Weiner allocator. SLOB is generally more space efficient but 2407b42f104SJohannes Weiner does not perform as well on large systems. 2417b42f104SJohannes Weiner 2427b42f104SJohannes Weinerendchoice 2437b42f104SJohannes Weiner 2447b42f104SJohannes Weinerconfig SLAB_MERGE_DEFAULT 2457b42f104SJohannes Weiner bool "Allow slab caches to be merged" 2467b42f104SJohannes Weiner default y 2477b42f104SJohannes Weiner depends on SLAB || SLUB 2487b42f104SJohannes Weiner help 2497b42f104SJohannes Weiner For reduced kernel memory fragmentation, slab caches can be 2507b42f104SJohannes Weiner merged when they share the same size and other characteristics. 2517b42f104SJohannes Weiner This carries a risk of kernel heap overflows being able to 2527b42f104SJohannes Weiner overwrite objects from merged caches (and more easily control 2537b42f104SJohannes Weiner cache layout), which makes such heap attacks easier to exploit 2547b42f104SJohannes Weiner by attackers. By keeping caches unmerged, these kinds of exploits 2557b42f104SJohannes Weiner can usually only damage objects in the same cache. To disable 2567b42f104SJohannes Weiner merging at runtime, "slab_nomerge" can be passed on the kernel 2577b42f104SJohannes Weiner command line. 2587b42f104SJohannes Weiner 2597b42f104SJohannes Weinerconfig SLAB_FREELIST_RANDOM 2607b42f104SJohannes Weiner bool "Randomize slab freelist" 2617b42f104SJohannes Weiner depends on SLAB || SLUB 2627b42f104SJohannes Weiner help 2637b42f104SJohannes Weiner Randomizes the freelist order used on creating new pages. This 2647b42f104SJohannes Weiner security feature reduces the predictability of the kernel slab 2657b42f104SJohannes Weiner allocator against heap overflows. 2667b42f104SJohannes Weiner 2677b42f104SJohannes Weinerconfig SLAB_FREELIST_HARDENED 2687b42f104SJohannes Weiner bool "Harden slab freelist metadata" 2697b42f104SJohannes Weiner depends on SLAB || SLUB 2707b42f104SJohannes Weiner help 2717b42f104SJohannes Weiner Many kernel heap attacks try to target slab cache metadata and 2727b42f104SJohannes Weiner other infrastructure. This options makes minor performance 2737b42f104SJohannes Weiner sacrifices to harden the kernel slab allocator against common 2747b42f104SJohannes Weiner freelist exploit methods. Some slab implementations have more 2757b42f104SJohannes Weiner sanity-checking than others. This option is most effective with 2767b42f104SJohannes Weiner CONFIG_SLUB. 2777b42f104SJohannes Weiner 278*519bcb79SJohannes Weinerconfig SLUB_CPU_PARTIAL 279*519bcb79SJohannes Weiner default y 280*519bcb79SJohannes Weiner depends on SLUB && SMP 281*519bcb79SJohannes Weiner bool "SLUB per cpu partial cache" 282*519bcb79SJohannes Weiner help 283*519bcb79SJohannes Weiner Per cpu partial caches accelerate objects allocation and freeing 284*519bcb79SJohannes Weiner that is local to a processor at the price of more indeterminism 285*519bcb79SJohannes Weiner in the latency of the free. On overflow these caches will be cleared 286*519bcb79SJohannes Weiner which requires the taking of locks that may cause latency spikes. 287*519bcb79SJohannes Weiner Typically one would choose no for a realtime system. 288*519bcb79SJohannes Weiner 289*519bcb79SJohannes Weinerendmenu # SLAB allocator options 290*519bcb79SJohannes Weiner 2917b42f104SJohannes Weinerconfig SHUFFLE_PAGE_ALLOCATOR 2927b42f104SJohannes Weiner bool "Page allocator randomization" 2937b42f104SJohannes Weiner default SLAB_FREELIST_RANDOM && ACPI_NUMA 2947b42f104SJohannes Weiner help 2957b42f104SJohannes Weiner Randomization of the page allocator improves the average 2967b42f104SJohannes Weiner utilization of a direct-mapped memory-side-cache. See section 2977b42f104SJohannes Weiner 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI 2987b42f104SJohannes Weiner 6.2a specification for an example of how a platform advertises 2997b42f104SJohannes Weiner the presence of a memory-side-cache. There are also incidental 3007b42f104SJohannes Weiner security benefits as it reduces the predictability of page 3017b42f104SJohannes Weiner allocations to compliment SLAB_FREELIST_RANDOM, but the 3027b42f104SJohannes Weiner default granularity of shuffling on the "MAX_ORDER - 1" i.e, 3037b42f104SJohannes Weiner 10th order of pages is selected based on cache utilization 3047b42f104SJohannes Weiner benefits on x86. 3057b42f104SJohannes Weiner 3067b42f104SJohannes Weiner While the randomization improves cache utilization it may 3077b42f104SJohannes Weiner negatively impact workloads on platforms without a cache. For 3087b42f104SJohannes Weiner this reason, by default, the randomization is enabled only 3097b42f104SJohannes Weiner after runtime detection of a direct-mapped memory-side-cache. 3107b42f104SJohannes Weiner Otherwise, the randomization may be force enabled with the 3117b42f104SJohannes Weiner 'page_alloc.shuffle' kernel command line parameter. 3127b42f104SJohannes Weiner 3137b42f104SJohannes Weiner Say Y if unsure. 3147b42f104SJohannes Weiner 315e1785e85SDave Hansenconfig SELECT_MEMORY_MODEL 316e1785e85SDave Hansen def_bool y 317a8826eebSKees Cook depends on ARCH_SELECT_MEMORY_MODEL 318e1785e85SDave Hansen 3193a9da765SDave Hansenchoice 3203a9da765SDave Hansen prompt "Memory model" 321e1785e85SDave Hansen depends on SELECT_MEMORY_MODEL 322d41dee36SAndy Whitcroft default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT 323e1785e85SDave Hansen default FLATMEM_MANUAL 324d66d109dSMike Rapoport help 325d66d109dSMike Rapoport This option allows you to change some of the ways that 326d66d109dSMike Rapoport Linux manages its memory internally. Most users will 327d66d109dSMike Rapoport only have one option here selected by the architecture 328d66d109dSMike Rapoport configuration. This is normal. 3293a9da765SDave Hansen 330e1785e85SDave Hansenconfig FLATMEM_MANUAL 3313a9da765SDave Hansen bool "Flat Memory" 332bb1c50d3SMike Rapoport depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE 3333a9da765SDave Hansen help 334d66d109dSMike Rapoport This option is best suited for non-NUMA systems with 335d66d109dSMike Rapoport flat address space. The FLATMEM is the most efficient 336d66d109dSMike Rapoport system in terms of performance and resource consumption 337d66d109dSMike Rapoport and it is the best option for smaller systems. 3383a9da765SDave Hansen 339d66d109dSMike Rapoport For systems that have holes in their physical address 340d66d109dSMike Rapoport spaces and for features like NUMA and memory hotplug, 341dd33d29aSRandy Dunlap choose "Sparse Memory". 342d41dee36SAndy Whitcroft 343d41dee36SAndy Whitcroft If unsure, choose this option (Flat Memory) over any other. 3443a9da765SDave Hansen 345d41dee36SAndy Whitcroftconfig SPARSEMEM_MANUAL 346d41dee36SAndy Whitcroft bool "Sparse Memory" 347d41dee36SAndy Whitcroft depends on ARCH_SPARSEMEM_ENABLE 348d41dee36SAndy Whitcroft help 349d41dee36SAndy Whitcroft This will be the only option for some systems, including 350d66d109dSMike Rapoport memory hot-plug systems. This is normal. 351d41dee36SAndy Whitcroft 352d66d109dSMike Rapoport This option provides efficient support for systems with 353d66d109dSMike Rapoport holes is their physical address space and allows memory 354d66d109dSMike Rapoport hot-plug and hot-remove. 355d41dee36SAndy Whitcroft 356d66d109dSMike Rapoport If unsure, choose "Flat Memory" over this option. 357d41dee36SAndy Whitcroft 3583a9da765SDave Hansenendchoice 3593a9da765SDave Hansen 360d41dee36SAndy Whitcroftconfig SPARSEMEM 361d41dee36SAndy Whitcroft def_bool y 3621a83e175SRussell King depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL 363d41dee36SAndy Whitcroft 364e1785e85SDave Hansenconfig FLATMEM 365e1785e85SDave Hansen def_bool y 366bb1c50d3SMike Rapoport depends on !SPARSEMEM || FLATMEM_MANUAL 367d41dee36SAndy Whitcroft 36893b7504eSDave Hansen# 3693e347261SBob Picco# SPARSEMEM_EXTREME (which is the default) does some bootmem 370c89ab04fSMike Rapoport# allocations when sparse_init() is called. If this cannot 3713e347261SBob Picco# be done on your architecture, select this option. However, 3723e347261SBob Picco# statically allocating the mem_section[] array can potentially 3733e347261SBob Picco# consume vast quantities of .bss, so be careful. 3743e347261SBob Picco# 3753e347261SBob Picco# This option will also potentially produce smaller runtime code 3763e347261SBob Picco# with gcc 3.4 and later. 3773e347261SBob Picco# 3783e347261SBob Piccoconfig SPARSEMEM_STATIC 3799ba16087SJan Beulich bool 3803e347261SBob Picco 3813e347261SBob Picco# 38244c09201SMatt LaPlante# Architecture platforms which require a two level mem_section in SPARSEMEM 383802f192eSBob Picco# must select this option. This is usually for architecture platforms with 384802f192eSBob Picco# an extremely sparse physical address space. 385802f192eSBob Picco# 3863e347261SBob Piccoconfig SPARSEMEM_EXTREME 3873e347261SBob Picco def_bool y 3883e347261SBob Picco depends on SPARSEMEM && !SPARSEMEM_STATIC 3894c21e2f2SHugh Dickins 39029c71111SAndy Whitcroftconfig SPARSEMEM_VMEMMAP_ENABLE 3919ba16087SJan Beulich bool 39229c71111SAndy Whitcroft 39329c71111SAndy Whitcroftconfig SPARSEMEM_VMEMMAP 394a5ee6daaSGeoff Levand bool "Sparse Memory virtual memmap" 395a5ee6daaSGeoff Levand depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE 396a5ee6daaSGeoff Levand default y 397a5ee6daaSGeoff Levand help 398a5ee6daaSGeoff Levand SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise 399a5ee6daaSGeoff Levand pfn_to_page and page_to_pfn operations. This is the most 400a5ee6daaSGeoff Levand efficient option when sufficient kernel resources are available. 40129c71111SAndy Whitcroft 40270210ed9SPhilipp Hachtmannconfig HAVE_MEMBLOCK_PHYS_MAP 4036341e62bSChristoph Jaeger bool 40470210ed9SPhilipp Hachtmann 40567a929e0SChristoph Hellwigconfig HAVE_FAST_GUP 406050a9adcSChristoph Hellwig depends on MMU 4076341e62bSChristoph Jaeger bool 4082667f50eSSteve Capper 40952219aeaSDavid Hildenbrand# Don't discard allocated memory used to track "memory" and "reserved" memblocks 41052219aeaSDavid Hildenbrand# after early boot, so it can still be used to test for validity of memory. 41152219aeaSDavid Hildenbrand# Also, memblocks are updated with memory hot(un)plug. 412350e88baSMike Rapoportconfig ARCH_KEEP_MEMBLOCK 4136341e62bSChristoph Jaeger bool 414c378ddd5STejun Heo 4151e5d8e1eSDan Williams# Keep arch NUMA mapping infrastructure post-init. 4161e5d8e1eSDan Williamsconfig NUMA_KEEP_MEMINFO 4171e5d8e1eSDan Williams bool 4181e5d8e1eSDan Williams 419ee6f509cSMinchan Kimconfig MEMORY_ISOLATION 4206341e62bSChristoph Jaeger bool 421ee6f509cSMinchan Kim 422a9e7b8d4SDavid Hildenbrand# IORESOURCE_SYSTEM_RAM regions in the kernel resource tree that are marked 423a9e7b8d4SDavid Hildenbrand# IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via 424a9e7b8d4SDavid Hildenbrand# /dev/mem. 425a9e7b8d4SDavid Hildenbrandconfig EXCLUSIVE_SYSTEM_RAM 426a9e7b8d4SDavid Hildenbrand def_bool y 427a9e7b8d4SDavid Hildenbrand depends on !DEVMEM || STRICT_DEVMEM 428a9e7b8d4SDavid Hildenbrand 42946723bfaSYasuaki Ishimatsu# 43046723bfaSYasuaki Ishimatsu# Only be set on architectures that have completely implemented memory hotplug 43146723bfaSYasuaki Ishimatsu# feature. If you are not sure, don't touch it. 43246723bfaSYasuaki Ishimatsu# 43346723bfaSYasuaki Ishimatsuconfig HAVE_BOOTMEM_INFO_NODE 43446723bfaSYasuaki Ishimatsu def_bool n 43546723bfaSYasuaki Ishimatsu 43691024b3cSAnshuman Khandualconfig ARCH_ENABLE_MEMORY_HOTPLUG 43791024b3cSAnshuman Khandual bool 43891024b3cSAnshuman Khandual 439*519bcb79SJohannes Weinerconfig ARCH_ENABLE_MEMORY_HOTREMOVE 440*519bcb79SJohannes Weiner bool 441*519bcb79SJohannes Weiner 4423947be19SDave Hansen# eventually, we can have this option just 'select SPARSEMEM' 443*519bcb79SJohannes Weinermenuconfig MEMORY_HOTPLUG 444*519bcb79SJohannes Weiner bool "Memory hotplug" 445b30c5927SDavid Hildenbrand select MEMORY_ISOLATION 44671b6f2ddSDavid Hildenbrand depends on SPARSEMEM 44740b31360SStephen Rothwell depends on ARCH_ENABLE_MEMORY_HOTPLUG 4487ec58a2bSDavid Hildenbrand depends on 64BIT 4491e5d8e1eSDan Williams select NUMA_KEEP_MEMINFO if NUMA 4503947be19SDave Hansen 451*519bcb79SJohannes Weinerif MEMORY_HOTPLUG 452*519bcb79SJohannes Weiner 4538604d9e5SVitaly Kuznetsovconfig MEMORY_HOTPLUG_DEFAULT_ONLINE 4548604d9e5SVitaly Kuznetsov bool "Online the newly added memory blocks by default" 4558604d9e5SVitaly Kuznetsov depends on MEMORY_HOTPLUG 4568604d9e5SVitaly Kuznetsov help 4578604d9e5SVitaly Kuznetsov This option sets the default policy setting for memory hotplug 4588604d9e5SVitaly Kuznetsov onlining policy (/sys/devices/system/memory/auto_online_blocks) which 4598604d9e5SVitaly Kuznetsov determines what happens to newly added memory regions. Policy setting 4608604d9e5SVitaly Kuznetsov can always be changed at runtime. 461cb1aaebeSMauro Carvalho Chehab See Documentation/admin-guide/mm/memory-hotplug.rst for more information. 4628604d9e5SVitaly Kuznetsov 4638604d9e5SVitaly Kuznetsov Say Y here if you want all hot-plugged memory blocks to appear in 4648604d9e5SVitaly Kuznetsov 'online' state by default. 4658604d9e5SVitaly Kuznetsov Say N here if you want the default policy to keep all hot-plugged 4668604d9e5SVitaly Kuznetsov memory blocks in 'offline' state. 4678604d9e5SVitaly Kuznetsov 4680c0e6195SKAMEZAWA Hiroyukiconfig MEMORY_HOTREMOVE 4690c0e6195SKAMEZAWA Hiroyuki bool "Allow for memory hot remove" 470f7e3334aSNathan Fontenot select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64) 4710c0e6195SKAMEZAWA Hiroyuki depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE 4720c0e6195SKAMEZAWA Hiroyuki depends on MIGRATION 4730c0e6195SKAMEZAWA Hiroyuki 474a08a2ae3SOscar Salvadorconfig MHP_MEMMAP_ON_MEMORY 475a08a2ae3SOscar Salvador def_bool y 476a08a2ae3SOscar Salvador depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP 477a08a2ae3SOscar Salvador depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE 478a08a2ae3SOscar Salvador 479*519bcb79SJohannes Weinerendif # MEMORY_HOTPLUG 480*519bcb79SJohannes Weiner 4814c21e2f2SHugh Dickins# Heavily threaded applications may benefit from splitting the mm-wide 4824c21e2f2SHugh Dickins# page_table_lock, so that faults on different parts of the user address 4834c21e2f2SHugh Dickins# space can be handled with less contention: split it at this NR_CPUS. 4844c21e2f2SHugh Dickins# Default to 4 for wider testing, though 8 might be more appropriate. 4854c21e2f2SHugh Dickins# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock. 4867b6ac9dfSHugh Dickins# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes. 48760bccaa6SWill Deacon# SPARC32 allocates multiple pte tables within a single page, and therefore 48860bccaa6SWill Deacon# a per-page lock leads to problems when multiple tables need to be locked 48960bccaa6SWill Deacon# at the same time (e.g. copy_page_range()). 490a70caa8bSHugh Dickins# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page. 4914c21e2f2SHugh Dickins# 4924c21e2f2SHugh Dickinsconfig SPLIT_PTLOCK_CPUS 4934c21e2f2SHugh Dickins int 4949164550eSKirill A. Shutemov default "999999" if !MMU 495a70caa8bSHugh Dickins default "999999" if ARM && !CPU_CACHE_VIPT 496a70caa8bSHugh Dickins default "999999" if PARISC && !PA20 49760bccaa6SWill Deacon default "999999" if SPARC32 4984c21e2f2SHugh Dickins default "4" 4997cbe34cfSChristoph Lameter 500e009bb30SKirill A. Shutemovconfig ARCH_ENABLE_SPLIT_PMD_PTLOCK 5016341e62bSChristoph Jaeger bool 502e009bb30SKirill A. Shutemov 5037cbe34cfSChristoph Lameter# 50409316c09SKonstantin Khlebnikov# support for memory balloon 50509316c09SKonstantin Khlebnikovconfig MEMORY_BALLOON 5066341e62bSChristoph Jaeger bool 50709316c09SKonstantin Khlebnikov 50809316c09SKonstantin Khlebnikov# 50918468d93SRafael Aquini# support for memory balloon compaction 51018468d93SRafael Aquiniconfig BALLOON_COMPACTION 51118468d93SRafael Aquini bool "Allow for balloon memory compaction/migration" 51218468d93SRafael Aquini def_bool y 51309316c09SKonstantin Khlebnikov depends on COMPACTION && MEMORY_BALLOON 51418468d93SRafael Aquini help 51518468d93SRafael Aquini Memory fragmentation introduced by ballooning might reduce 51618468d93SRafael Aquini significantly the number of 2MB contiguous memory blocks that can be 51718468d93SRafael Aquini used within a guest, thus imposing performance penalties associated 51818468d93SRafael Aquini with the reduced number of transparent huge pages that could be used 51918468d93SRafael Aquini by the guest workload. Allowing the compaction & migration for memory 52018468d93SRafael Aquini pages enlisted as being part of memory balloon devices avoids the 52118468d93SRafael Aquini scenario aforementioned and helps improving memory defragmentation. 52218468d93SRafael Aquini 52318468d93SRafael Aquini# 524e9e96b39SMel Gorman# support for memory compaction 525e9e96b39SMel Gormanconfig COMPACTION 526e9e96b39SMel Gorman bool "Allow for memory compaction" 52705106e6aSRik van Riel def_bool y 528e9e96b39SMel Gorman select MIGRATION 52933a93877SAndrea Arcangeli depends on MMU 530e9e96b39SMel Gorman help 531b32eaf71SMichal Hocko Compaction is the only memory management component to form 532b32eaf71SMichal Hocko high order (larger physically contiguous) memory blocks 533b32eaf71SMichal Hocko reliably. The page allocator relies on compaction heavily and 534b32eaf71SMichal Hocko the lack of the feature can lead to unexpected OOM killer 535b32eaf71SMichal Hocko invocations for high order memory requests. You shouldn't 536b32eaf71SMichal Hocko disable this option unless there really is a strong reason for 537b32eaf71SMichal Hocko it and then we would be really interested to hear about that at 538b32eaf71SMichal Hocko linux-mm@kvack.org. 539e9e96b39SMel Gorman 540e9e96b39SMel Gorman# 54136e66c55SAlexander Duyck# support for free page reporting 54236e66c55SAlexander Duyckconfig PAGE_REPORTING 54336e66c55SAlexander Duyck bool "Free page reporting" 54436e66c55SAlexander Duyck def_bool n 54536e66c55SAlexander Duyck help 54636e66c55SAlexander Duyck Free page reporting allows for the incremental acquisition of 54736e66c55SAlexander Duyck free pages from the buddy allocator for the purpose of reporting 54836e66c55SAlexander Duyck those pages to another entity, such as a hypervisor, so that the 54936e66c55SAlexander Duyck memory can be freed within the host for other uses. 55036e66c55SAlexander Duyck 55136e66c55SAlexander Duyck# 5527cbe34cfSChristoph Lameter# support for page migration 5537cbe34cfSChristoph Lameter# 5547cbe34cfSChristoph Lameterconfig MIGRATION 555b20a3503SChristoph Lameter bool "Page migration" 5566c5240aeSChristoph Lameter def_bool y 557de32a817SChen Gang depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU 558b20a3503SChristoph Lameter help 559b20a3503SChristoph Lameter Allows the migration of the physical location of pages of processes 560e9e96b39SMel Gorman while the virtual addresses are not changed. This is useful in 561e9e96b39SMel Gorman two situations. The first is on NUMA systems to put pages nearer 562e9e96b39SMel Gorman to the processors accessing. The second is when allocating huge 563e9e96b39SMel Gorman pages as migration can relocate pages to satisfy a huge page 564e9e96b39SMel Gorman allocation instead of reclaiming. 5656550e07fSGreg Kroah-Hartman 56676cbbeadSChristoph Hellwigconfig DEVICE_MIGRATION 567d90a25f8SChristoph Hellwig def_bool MIGRATION && ZONE_DEVICE 56876cbbeadSChristoph Hellwig 569c177c81eSNaoya Horiguchiconfig ARCH_ENABLE_HUGEPAGE_MIGRATION 5706341e62bSChristoph Jaeger bool 571c177c81eSNaoya Horiguchi 5729c670ea3SNaoya Horiguchiconfig ARCH_ENABLE_THP_MIGRATION 5739c670ea3SNaoya Horiguchi bool 5749c670ea3SNaoya Horiguchi 5754bfb68a0SAnshuman Khandualconfig HUGETLB_PAGE_SIZE_VARIABLE 5764bfb68a0SAnshuman Khandual def_bool n 5774bfb68a0SAnshuman Khandual help 5784bfb68a0SAnshuman Khandual Allows the pageblock_order value to be dynamic instead of just standard 5794bfb68a0SAnshuman Khandual HUGETLB_PAGE_ORDER when there are multiple HugeTLB page sizes available 5804bfb68a0SAnshuman Khandual on a platform. 5814bfb68a0SAnshuman Khandual 582b3d40a2bSDavid Hildenbrand Note that the pageblock_order cannot exceed MAX_ORDER - 1 and will be 583b3d40a2bSDavid Hildenbrand clamped down to MAX_ORDER - 1. 584b3d40a2bSDavid Hildenbrand 5858df995f6SAlexandre Ghiticonfig CONTIG_ALLOC 5868df995f6SAlexandre Ghiti def_bool (MEMORY_ISOLATION && COMPACTION) || CMA 5878df995f6SAlexandre Ghiti 588600715dcSJeremy Fitzhardingeconfig PHYS_ADDR_T_64BIT 589d4a451d5SChristoph Hellwig def_bool 64BIT 590600715dcSJeremy Fitzhardinge 5912a7326b5SChristoph Lameterconfig BOUNCE 5929ca24e2eSVinayak Menon bool "Enable bounce buffers" 5939ca24e2eSVinayak Menon default y 594ce288e05SChristoph Hellwig depends on BLOCK && MMU && HIGHMEM 5959ca24e2eSVinayak Menon help 596ce288e05SChristoph Hellwig Enable bounce buffers for devices that cannot access the full range of 597ce288e05SChristoph Hellwig memory available to the CPU. Enabled by default when HIGHMEM is 598ce288e05SChristoph Hellwig selected, but you may say n to override this. 5992a7326b5SChristoph Lameter 600f057eac0SStephen Rothwellconfig VIRT_TO_BUS 6014febd95aSStephen Rothwell bool 6024febd95aSStephen Rothwell help 6034febd95aSStephen Rothwell An architecture should select this if it implements the 6044febd95aSStephen Rothwell deprecated interface virt_to_bus(). All new architectures 6054febd95aSStephen Rothwell should probably not select this. 6064febd95aSStephen Rothwell 607cddb8a5cSAndrea Arcangeli 608cddb8a5cSAndrea Arcangeliconfig MMU_NOTIFIER 609cddb8a5cSAndrea Arcangeli bool 61083fe27eaSPranith Kumar select SRCU 61199cb252fSJason Gunthorpe select INTERVAL_TREE 612fc4d5c29SDavid Howells 613f8af4da3SHugh Dickinsconfig KSM 614f8af4da3SHugh Dickins bool "Enable KSM for page merging" 615f8af4da3SHugh Dickins depends on MMU 61659e1a2f4STimofey Titovets select XXHASH 617f8af4da3SHugh Dickins help 618f8af4da3SHugh Dickins Enable Kernel Samepage Merging: KSM periodically scans those areas 619f8af4da3SHugh Dickins of an application's address space that an app has advised may be 620f8af4da3SHugh Dickins mergeable. When it finds pages of identical content, it replaces 621d0f209f6SHugh Dickins the many instances by a single page with that content, so 622f8af4da3SHugh Dickins saving memory until one or another app needs to modify the content. 623f8af4da3SHugh Dickins Recommended for use with KVM, or with other duplicative applications. 624ad56b738SMike Rapoport See Documentation/vm/ksm.rst for more information: KSM is inactive 625c73602adSHugh Dickins until a program has madvised that an area is MADV_MERGEABLE, and 626c73602adSHugh Dickins root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set). 627f8af4da3SHugh Dickins 628e0a94c2aSChristoph Lameterconfig DEFAULT_MMAP_MIN_ADDR 629e0a94c2aSChristoph Lameter int "Low address space to protect from user allocation" 6306e141546SDavid Howells depends on MMU 631e0a94c2aSChristoph Lameter default 4096 632e0a94c2aSChristoph Lameter help 633e0a94c2aSChristoph Lameter This is the portion of low virtual memory which should be protected 634e0a94c2aSChristoph Lameter from userspace allocation. Keeping a user from writing to low pages 635e0a94c2aSChristoph Lameter can help reduce the impact of kernel NULL pointer bugs. 636e0a94c2aSChristoph Lameter 637e0a94c2aSChristoph Lameter For most ia64, ppc64 and x86 users with lots of address space 638e0a94c2aSChristoph Lameter a value of 65536 is reasonable and should cause no problems. 639e0a94c2aSChristoph Lameter On arm and other archs it should not be higher than 32768. 640788084abSEric Paris Programs which use vm86 functionality or have some need to map 641788084abSEric Paris this low address space will need CAP_SYS_RAWIO or disable this 642788084abSEric Paris protection by setting the value to 0. 643e0a94c2aSChristoph Lameter 644e0a94c2aSChristoph Lameter This value can be changed after boot using the 645e0a94c2aSChristoph Lameter /proc/sys/vm/mmap_min_addr tunable. 646e0a94c2aSChristoph Lameter 647d949f36fSLinus Torvaldsconfig ARCH_SUPPORTS_MEMORY_FAILURE 648d949f36fSLinus Torvalds bool 649e0a94c2aSChristoph Lameter 6506a46079cSAndi Kleenconfig MEMORY_FAILURE 6516a46079cSAndi Kleen depends on MMU 652d949f36fSLinus Torvalds depends on ARCH_SUPPORTS_MEMORY_FAILURE 6536a46079cSAndi Kleen bool "Enable recovery from hardware memory errors" 654ee6f509cSMinchan Kim select MEMORY_ISOLATION 65597f0b134SXie XiuQi select RAS 6566a46079cSAndi Kleen help 6576a46079cSAndi Kleen Enables code to recover from some memory failures on systems 6586a46079cSAndi Kleen with MCA recovery. This allows a system to continue running 6596a46079cSAndi Kleen even when some of its memory has uncorrected errors. This requires 6606a46079cSAndi Kleen special hardware support and typically ECC memory. 6616a46079cSAndi Kleen 662cae681fcSAndi Kleenconfig HWPOISON_INJECT 663413f9efbSAndi Kleen tristate "HWPoison pages injector" 66427df5068SAndi Kleen depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS 665478c5ffcSWu Fengguang select PROC_PAGE_MONITOR 666cae681fcSAndi Kleen 667fc4d5c29SDavid Howellsconfig NOMMU_INITIAL_TRIM_EXCESS 668fc4d5c29SDavid Howells int "Turn on mmap() excess space trimming before booting" 669fc4d5c29SDavid Howells depends on !MMU 670fc4d5c29SDavid Howells default 1 671fc4d5c29SDavid Howells help 672fc4d5c29SDavid Howells The NOMMU mmap() frequently needs to allocate large contiguous chunks 673fc4d5c29SDavid Howells of memory on which to store mappings, but it can only ask the system 674fc4d5c29SDavid Howells allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently 675fc4d5c29SDavid Howells more than it requires. To deal with this, mmap() is able to trim off 676fc4d5c29SDavid Howells the excess and return it to the allocator. 677fc4d5c29SDavid Howells 678fc4d5c29SDavid Howells If trimming is enabled, the excess is trimmed off and returned to the 679fc4d5c29SDavid Howells system allocator, which can cause extra fragmentation, particularly 680fc4d5c29SDavid Howells if there are a lot of transient processes. 681fc4d5c29SDavid Howells 682fc4d5c29SDavid Howells If trimming is disabled, the excess is kept, but not used, which for 683fc4d5c29SDavid Howells long-term mappings means that the space is wasted. 684fc4d5c29SDavid Howells 685fc4d5c29SDavid Howells Trimming can be dynamically controlled through a sysctl option 686fc4d5c29SDavid Howells (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of 687fc4d5c29SDavid Howells excess pages there must be before trimming should occur, or zero if 688fc4d5c29SDavid Howells no trimming is to occur. 689fc4d5c29SDavid Howells 690fc4d5c29SDavid Howells This option specifies the initial value of this option. The default 691fc4d5c29SDavid Howells of 1 says that all excess pages should be trimmed. 692fc4d5c29SDavid Howells 693dd19d293SStephen Kitt See Documentation/admin-guide/mm/nommu-mmap.rst for more information. 694bbddff05STejun Heo 695*519bcb79SJohannes Weinerconfig ARCH_WANT_GENERAL_HUGETLB 696*519bcb79SJohannes Weiner bool 697*519bcb79SJohannes Weiner 698*519bcb79SJohannes Weinerconfig ARCH_WANTS_THP_SWAP 699*519bcb79SJohannes Weiner def_bool n 700*519bcb79SJohannes Weiner 701*519bcb79SJohannes Weinermenuconfig TRANSPARENT_HUGEPAGE 70213ece886SAndrea Arcangeli bool "Transparent Hugepage Support" 703554b0f3cSSebastian Andrzej Siewior depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE && !PREEMPT_RT 7045d689240SAndrea Arcangeli select COMPACTION 7053a08cd52SMatthew Wilcox select XARRAY_MULTI 7064c76d9d1SAndrea Arcangeli help 7074c76d9d1SAndrea Arcangeli Transparent Hugepages allows the kernel to use huge pages and 7084c76d9d1SAndrea Arcangeli huge tlb transparently to the applications whenever possible. 7094c76d9d1SAndrea Arcangeli This feature can improve computing performance to certain 7104c76d9d1SAndrea Arcangeli applications by speeding up page faults during memory 7114c76d9d1SAndrea Arcangeli allocation, by reducing the number of tlb misses and by speeding 7124c76d9d1SAndrea Arcangeli up the pagetable walking. 7134c76d9d1SAndrea Arcangeli 7144c76d9d1SAndrea Arcangeli If memory constrained on embedded, you may want to say N. 7154c76d9d1SAndrea Arcangeli 716*519bcb79SJohannes Weinerif TRANSPARENT_HUGEPAGE 717*519bcb79SJohannes Weiner 71813ece886SAndrea Arcangelichoice 71913ece886SAndrea Arcangeli prompt "Transparent Hugepage Support sysfs defaults" 72013ece886SAndrea Arcangeli depends on TRANSPARENT_HUGEPAGE 72113ece886SAndrea Arcangeli default TRANSPARENT_HUGEPAGE_ALWAYS 72213ece886SAndrea Arcangeli help 72313ece886SAndrea Arcangeli Selects the sysfs defaults for Transparent Hugepage Support. 72413ece886SAndrea Arcangeli 72513ece886SAndrea Arcangeli config TRANSPARENT_HUGEPAGE_ALWAYS 72613ece886SAndrea Arcangeli bool "always" 72713ece886SAndrea Arcangeli help 72813ece886SAndrea Arcangeli Enabling Transparent Hugepage always, can increase the 72913ece886SAndrea Arcangeli memory footprint of applications without a guaranteed 73013ece886SAndrea Arcangeli benefit but it will work automatically for all applications. 73113ece886SAndrea Arcangeli 73213ece886SAndrea Arcangeli config TRANSPARENT_HUGEPAGE_MADVISE 73313ece886SAndrea Arcangeli bool "madvise" 73413ece886SAndrea Arcangeli help 73513ece886SAndrea Arcangeli Enabling Transparent Hugepage madvise, will only provide a 73613ece886SAndrea Arcangeli performance improvement benefit to the applications using 73713ece886SAndrea Arcangeli madvise(MADV_HUGEPAGE) but it won't risk to increase the 73813ece886SAndrea Arcangeli memory footprint of applications without a guaranteed 73913ece886SAndrea Arcangeli benefit. 74013ece886SAndrea Arcangeliendchoice 74113ece886SAndrea Arcangeli 74238d8b4e6SHuang Yingconfig THP_SWAP 74338d8b4e6SHuang Ying def_bool y 74414fef284SHuang Ying depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP 74538d8b4e6SHuang Ying help 74638d8b4e6SHuang Ying Swap transparent huge pages in one piece, without splitting. 74714fef284SHuang Ying XXX: For now, swap cluster backing transparent huge page 74814fef284SHuang Ying will be split after swapout. 74938d8b4e6SHuang Ying 75038d8b4e6SHuang Ying For selection by architectures with reasonable THP sizes. 75138d8b4e6SHuang Ying 752*519bcb79SJohannes Weinerconfig READ_ONLY_THP_FOR_FS 753*519bcb79SJohannes Weiner bool "Read-only THP for filesystems (EXPERIMENTAL)" 754*519bcb79SJohannes Weiner depends on TRANSPARENT_HUGEPAGE && SHMEM 755*519bcb79SJohannes Weiner 756*519bcb79SJohannes Weiner help 757*519bcb79SJohannes Weiner Allow khugepaged to put read-only file-backed pages in THP. 758*519bcb79SJohannes Weiner 759*519bcb79SJohannes Weiner This is marked experimental because it is a new feature. Write 760*519bcb79SJohannes Weiner support of file THPs will be developed in the next few release 761*519bcb79SJohannes Weiner cycles. 762*519bcb79SJohannes Weiner 763*519bcb79SJohannes Weinerendif # TRANSPARENT_HUGEPAGE 764*519bcb79SJohannes Weiner 765e496cf3dSKirill A. Shutemov# 766bbddff05STejun Heo# UP and nommu archs use km based percpu allocator 767bbddff05STejun Heo# 768bbddff05STejun Heoconfig NEED_PER_CPU_KM 7693583521aSVladimir Murzin depends on !SMP || !MMU 770bbddff05STejun Heo bool 771bbddff05STejun Heo default y 772077b1f83SDan Magenheimer 7737ecd19cfSKefeng Wangconfig NEED_PER_CPU_EMBED_FIRST_CHUNK 7747ecd19cfSKefeng Wang bool 7757ecd19cfSKefeng Wang 7767ecd19cfSKefeng Wangconfig NEED_PER_CPU_PAGE_FIRST_CHUNK 7777ecd19cfSKefeng Wang bool 7787ecd19cfSKefeng Wang 7797ecd19cfSKefeng Wangconfig USE_PERCPU_NUMA_NODE_ID 7807ecd19cfSKefeng Wang bool 7817ecd19cfSKefeng Wang 7827ecd19cfSKefeng Wangconfig HAVE_SETUP_PER_CPU_AREA 7837ecd19cfSKefeng Wang bool 7847ecd19cfSKefeng Wang 78527c6aec2SDan Magenheimerconfig FRONTSWAP 7866e61dde8SChristoph Hellwig bool 787f825c736SAneesh Kumar K.V 788f825c736SAneesh Kumar K.Vconfig CMA 789f825c736SAneesh Kumar K.V bool "Contiguous Memory Allocator" 790aca52c39SMike Rapoport depends on MMU 791f825c736SAneesh Kumar K.V select MIGRATION 792f825c736SAneesh Kumar K.V select MEMORY_ISOLATION 793f825c736SAneesh Kumar K.V help 794f825c736SAneesh Kumar K.V This enables the Contiguous Memory Allocator which allows other 795f825c736SAneesh Kumar K.V subsystems to allocate big physically-contiguous blocks of memory. 796f825c736SAneesh Kumar K.V CMA reserves a region of memory and allows only movable pages to 797f825c736SAneesh Kumar K.V be allocated from it. This way, the kernel can use the memory for 798f825c736SAneesh Kumar K.V pagecache and when a subsystem requests for contiguous area, the 799f825c736SAneesh Kumar K.V allocated pages are migrated away to serve the contiguous request. 800f825c736SAneesh Kumar K.V 801f825c736SAneesh Kumar K.V If unsure, say "n". 802f825c736SAneesh Kumar K.V 803f825c736SAneesh Kumar K.Vconfig CMA_DEBUG 804f825c736SAneesh Kumar K.V bool "CMA debug messages (DEVELOPMENT)" 805f825c736SAneesh Kumar K.V depends on DEBUG_KERNEL && CMA 806f825c736SAneesh Kumar K.V help 807f825c736SAneesh Kumar K.V Turns on debug messages in CMA. This produces KERN_DEBUG 808f825c736SAneesh Kumar K.V messages for every CMA call as well as various messages while 809f825c736SAneesh Kumar K.V processing calls such as dma_alloc_from_contiguous(). 810f825c736SAneesh Kumar K.V This option does not affect warning and error messages. 811bf550fc9SAlexander Graf 81228b24c1fSSasha Levinconfig CMA_DEBUGFS 81328b24c1fSSasha Levin bool "CMA debugfs interface" 81428b24c1fSSasha Levin depends on CMA && DEBUG_FS 81528b24c1fSSasha Levin help 81628b24c1fSSasha Levin Turns on the DebugFS interface for CMA. 81728b24c1fSSasha Levin 81843ca106fSMinchan Kimconfig CMA_SYSFS 81943ca106fSMinchan Kim bool "CMA information through sysfs interface" 82043ca106fSMinchan Kim depends on CMA && SYSFS 82143ca106fSMinchan Kim help 82243ca106fSMinchan Kim This option exposes some sysfs attributes to get information 82343ca106fSMinchan Kim from CMA. 82443ca106fSMinchan Kim 825a254129eSJoonsoo Kimconfig CMA_AREAS 826a254129eSJoonsoo Kim int "Maximum count of the CMA areas" 827a254129eSJoonsoo Kim depends on CMA 828b7176c26SBarry Song default 19 if NUMA 829a254129eSJoonsoo Kim default 7 830a254129eSJoonsoo Kim help 831a254129eSJoonsoo Kim CMA allows to create CMA areas for particular purpose, mainly, 832a254129eSJoonsoo Kim used as device private area. This parameter sets the maximum 833a254129eSJoonsoo Kim number of CMA area in the system. 834a254129eSJoonsoo Kim 835b7176c26SBarry Song If unsure, leave the default value "7" in UMA and "19" in NUMA. 836a254129eSJoonsoo Kim 837af8d417aSDan Streetmanconfig MEM_SOFT_DIRTY 838af8d417aSDan Streetman bool "Track memory changes" 839af8d417aSDan Streetman depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS 840af8d417aSDan Streetman select PROC_PAGE_MONITOR 8414e2e2770SSeth Jennings help 842af8d417aSDan Streetman This option enables memory changes tracking by introducing a 843af8d417aSDan Streetman soft-dirty bit on pte-s. This bit it set when someone writes 844af8d417aSDan Streetman into a page just as regular dirty bit, but unlike the latter 845af8d417aSDan Streetman it can be cleared by hands. 846af8d417aSDan Streetman 8471ad1335dSMike Rapoport See Documentation/admin-guide/mm/soft-dirty.rst for more details. 8484e2e2770SSeth Jennings 8499e5c33d7SMark Salterconfig GENERIC_EARLY_IOREMAP 8509e5c33d7SMark Salter bool 851042d27acSHelge Deller 85222ee3ea5SHelge Dellerconfig STACK_MAX_DEFAULT_SIZE_MB 85322ee3ea5SHelge Deller int "Default maximum user stack size for 32-bit processes (MB)" 85422ee3ea5SHelge Deller default 100 855042d27acSHelge Deller range 8 2048 856042d27acSHelge Deller depends on STACK_GROWSUP && (!64BIT || COMPAT) 857042d27acSHelge Deller help 858042d27acSHelge Deller This is the maximum stack size in Megabytes in the VM layout of 32-bit 859042d27acSHelge Deller user processes when the stack grows upwards (currently only on parisc 86022ee3ea5SHelge Deller arch) when the RLIMIT_STACK hard limit is unlimited. 861042d27acSHelge Deller 86222ee3ea5SHelge Deller A sane initial value is 100 MB. 8633a80a7faSMel Gorman 8643a80a7faSMel Gormanconfig DEFERRED_STRUCT_PAGE_INIT 8651ce22103SVlastimil Babka bool "Defer initialisation of struct pages to kthreads" 866d39f8fb4SMike Rapoport depends on SPARSEMEM 867ab1e8d89SPavel Tatashin depends on !NEED_PER_CPU_KM 868889c695dSPasha Tatashin depends on 64BIT 869e4443149SDaniel Jordan select PADATA 8703a80a7faSMel Gorman help 8713a80a7faSMel Gorman Ordinarily all struct pages are initialised during early boot in a 8723a80a7faSMel Gorman single thread. On very large machines this can take a considerable 8733a80a7faSMel Gorman amount of time. If this option is set, large machines will bring up 874e4443149SDaniel Jordan a subset of memmap at boot and then initialise the rest in parallel. 875e4443149SDaniel Jordan This has a potential performance impact on tasks running early in the 8761ce22103SVlastimil Babka lifetime of the system until these kthreads finish the 8771ce22103SVlastimil Babka initialisation. 878033fbae9SDan Williams 8791c676e0dSSeongJae Parkconfig PAGE_IDLE_FLAG 8801c676e0dSSeongJae Park bool 8811c676e0dSSeongJae Park select PAGE_EXTENSION if !64BIT 8821c676e0dSSeongJae Park help 8831c676e0dSSeongJae Park This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed 8841c676e0dSSeongJae Park bit writers can set the state of the bit in the flags so that PTE 8851c676e0dSSeongJae Park Accessed bit readers may avoid disturbance. 8861c676e0dSSeongJae Park 88733c3fc71SVladimir Davydovconfig IDLE_PAGE_TRACKING 88833c3fc71SVladimir Davydov bool "Enable idle page tracking" 88933c3fc71SVladimir Davydov depends on SYSFS && MMU 8901c676e0dSSeongJae Park select PAGE_IDLE_FLAG 89133c3fc71SVladimir Davydov help 89233c3fc71SVladimir Davydov This feature allows to estimate the amount of user pages that have 89333c3fc71SVladimir Davydov not been touched during a given period of time. This information can 89433c3fc71SVladimir Davydov be useful to tune memory cgroup limits and/or for job placement 89533c3fc71SVladimir Davydov within a compute cluster. 89633c3fc71SVladimir Davydov 8971ad1335dSMike Rapoport See Documentation/admin-guide/mm/idle_page_tracking.rst for 8981ad1335dSMike Rapoport more details. 89933c3fc71SVladimir Davydov 900c2280be8SAnshuman Khandualconfig ARCH_HAS_CACHE_LINE_SIZE 901c2280be8SAnshuman Khandual bool 902c2280be8SAnshuman Khandual 9032792d84eSKees Cookconfig ARCH_HAS_CURRENT_STACK_POINTER 9042792d84eSKees Cook bool 9052792d84eSKees Cook help 9062792d84eSKees Cook In support of HARDENED_USERCOPY performing stack variable lifetime 9072792d84eSKees Cook checking, an architecture-agnostic way to find the stack pointer 9082792d84eSKees Cook is needed. Once an architecture defines an unsigned long global 9092792d84eSKees Cook register alias named "current_stack_pointer", this config can be 9102792d84eSKees Cook selected. 9112792d84eSKees Cook 91267436193SAnshuman Khandualconfig ARCH_HAS_VM_GET_PAGE_PROT 91367436193SAnshuman Khandual bool 91467436193SAnshuman Khandual 91517596731SRobin Murphyconfig ARCH_HAS_PTE_DEVMAP 91665f7d049SOliver O'Halloran bool 91765f7d049SOliver O'Halloran 91863703f37SKefeng Wangconfig ARCH_HAS_ZONE_DMA_SET 91963703f37SKefeng Wang bool 92063703f37SKefeng Wang 92163703f37SKefeng Wangconfig ZONE_DMA 92263703f37SKefeng Wang bool "Support DMA zone" if ARCH_HAS_ZONE_DMA_SET 92363703f37SKefeng Wang default y if ARM64 || X86 92463703f37SKefeng Wang 92563703f37SKefeng Wangconfig ZONE_DMA32 92663703f37SKefeng Wang bool "Support DMA32 zone" if ARCH_HAS_ZONE_DMA_SET 92763703f37SKefeng Wang depends on !X86_32 92863703f37SKefeng Wang default y if ARM64 92963703f37SKefeng Wang 930033fbae9SDan Williamsconfig ZONE_DEVICE 9315042db43SJérôme Glisse bool "Device memory (pmem, HMM, etc...) hotplug support" 932033fbae9SDan Williams depends on MEMORY_HOTPLUG 933033fbae9SDan Williams depends on MEMORY_HOTREMOVE 93499490f16SDan Williams depends on SPARSEMEM_VMEMMAP 93517596731SRobin Murphy depends on ARCH_HAS_PTE_DEVMAP 9363a08cd52SMatthew Wilcox select XARRAY_MULTI 937033fbae9SDan Williams 938033fbae9SDan Williams help 939033fbae9SDan Williams Device memory hotplug support allows for establishing pmem, 940033fbae9SDan Williams or other device driver discovered memory regions, in the 941033fbae9SDan Williams memmap. This allows pfn_to_page() lookups of otherwise 942033fbae9SDan Williams "device-physical" addresses which is needed for using a DAX 943033fbae9SDan Williams mapping in an O_DIRECT operation, among other things. 944033fbae9SDan Williams 945033fbae9SDan Williams If FS_DAX is enabled, then say Y. 94606a660adSLinus Torvalds 9479c240a7bSChristoph Hellwig# 9489c240a7bSChristoph Hellwig# Helpers to mirror range of the CPU page tables of a process into device page 9499c240a7bSChristoph Hellwig# tables. 9509c240a7bSChristoph Hellwig# 951c0b12405SJérôme Glisseconfig HMM_MIRROR 9529c240a7bSChristoph Hellwig bool 953f442c283SChristoph Hellwig depends on MMU 954c0b12405SJérôme Glisse 9555042db43SJérôme Glisseconfig DEVICE_PRIVATE 9565042db43SJérôme Glisse bool "Unaddressable device memory (GPU memory, ...)" 9577328d9ccSChristoph Hellwig depends on ZONE_DEVICE 9585042db43SJérôme Glisse 9595042db43SJérôme Glisse help 9605042db43SJérôme Glisse Allows creation of struct pages to represent unaddressable device 9615042db43SJérôme Glisse memory; i.e., memory that is only accessible from the device (or 9625042db43SJérôme Glisse group of devices). You likely also want to select HMM_MIRROR. 9635042db43SJérôme Glisse 9643e9a9e25SChristoph Hellwigconfig VMAP_PFN 9653e9a9e25SChristoph Hellwig bool 9663e9a9e25SChristoph Hellwig 96763c17fb8SDave Hansenconfig ARCH_USES_HIGH_VMA_FLAGS 96863c17fb8SDave Hansen bool 96966d37570SDave Hansenconfig ARCH_HAS_PKEYS 97066d37570SDave Hansen bool 97130a5b536SDennis Zhou 97230a5b536SDennis Zhouconfig PERCPU_STATS 97330a5b536SDennis Zhou bool "Collect percpu memory statistics" 97430a5b536SDennis Zhou help 97530a5b536SDennis Zhou This feature collects and exposes statistics via debugfs. The 97630a5b536SDennis Zhou information includes global and per chunk statistics, which can 97730a5b536SDennis Zhou be used to help understand percpu memory usage. 97864c349f4SKirill A. Shutemov 9799c84f229SJohn Hubbardconfig GUP_TEST 9809c84f229SJohn Hubbard bool "Enable infrastructure for get_user_pages()-related unit tests" 981d0de8241SBarry Song depends on DEBUG_FS 98264c349f4SKirill A. Shutemov help 9839c84f229SJohn Hubbard Provides /sys/kernel/debug/gup_test, which in turn provides a way 9849c84f229SJohn Hubbard to make ioctl calls that can launch kernel-based unit tests for 9859c84f229SJohn Hubbard the get_user_pages*() and pin_user_pages*() family of API calls. 98664c349f4SKirill A. Shutemov 9879c84f229SJohn Hubbard These tests include benchmark testing of the _fast variants of 9889c84f229SJohn Hubbard get_user_pages*() and pin_user_pages*(), as well as smoke tests of 9899c84f229SJohn Hubbard the non-_fast variants. 9909c84f229SJohn Hubbard 991f4f9bda4SJohn Hubbard There is also a sub-test that allows running dump_page() on any 992f4f9bda4SJohn Hubbard of up to eight pages (selected by command line args) within the 993f4f9bda4SJohn Hubbard range of user-space addresses. These pages are either pinned via 994f4f9bda4SJohn Hubbard pin_user_pages*(), or pinned via get_user_pages*(), as specified 995f4f9bda4SJohn Hubbard by other command line arguments. 996f4f9bda4SJohn Hubbard 9979c84f229SJohn Hubbard See tools/testing/selftests/vm/gup_test.c 9983010a5eaSLaurent Dufour 999d0de8241SBarry Songcomment "GUP_TEST needs to have DEBUG_FS enabled" 1000d0de8241SBarry Song depends on !GUP_TEST && !DEBUG_FS 10013010a5eaSLaurent Dufour 100239656e83SChristoph Hellwigconfig GUP_GET_PTE_LOW_HIGH 100339656e83SChristoph Hellwig bool 100439656e83SChristoph Hellwig 10053010a5eaSLaurent Dufourconfig ARCH_HAS_PTE_SPECIAL 10063010a5eaSLaurent Dufour bool 100759e0b520SChristoph Hellwig 1008cbd34da7SChristoph Hellwig# 1009cbd34da7SChristoph Hellwig# Some architectures require a special hugepage directory format that is 1010cbd34da7SChristoph Hellwig# required to support multiple hugepage sizes. For example a4fe3ce76 1011cbd34da7SChristoph Hellwig# "powerpc/mm: Allow more flexible layouts for hugepage pagetables" 1012cbd34da7SChristoph Hellwig# introduced it on powerpc. This allows for a more flexible hugepage 1013cbd34da7SChristoph Hellwig# pagetable layouts. 1014cbd34da7SChristoph Hellwig# 1015cbd34da7SChristoph Hellwigconfig ARCH_HAS_HUGEPD 1016cbd34da7SChristoph Hellwig bool 1017cbd34da7SChristoph Hellwig 1018c5acad84SThomas Hellstromconfig MAPPING_DIRTY_HELPERS 1019c5acad84SThomas Hellstrom bool 1020c5acad84SThomas Hellstrom 1021298fa1adSThomas Gleixnerconfig KMAP_LOCAL 1022298fa1adSThomas Gleixner bool 1023298fa1adSThomas Gleixner 1024825c43f5SArd Biesheuvelconfig KMAP_LOCAL_NON_LINEAR_PTE_ARRAY 1025825c43f5SArd Biesheuvel bool 1026825c43f5SArd Biesheuvel 10271fbaf8fcSChristoph Hellwig# struct io_mapping based helper. Selected by drivers that need them 10281fbaf8fcSChristoph Hellwigconfig IO_MAPPING 10291fbaf8fcSChristoph Hellwig bool 10301507f512SMike Rapoport 10311507f512SMike Rapoportconfig SECRETMEM 10321507f512SMike Rapoport def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED 10331507f512SMike Rapoport 10349a10064fSColin Crossconfig ANON_VMA_NAME 10359a10064fSColin Cross bool "Anonymous VMA name support" 10369a10064fSColin Cross depends on PROC_FS && ADVISE_SYSCALLS && MMU 10379a10064fSColin Cross 10389a10064fSColin Cross help 10399a10064fSColin Cross Allow naming anonymous virtual memory areas. 10409a10064fSColin Cross 10419a10064fSColin Cross This feature allows assigning names to virtual memory areas. Assigned 10429a10064fSColin Cross names can be later retrieved from /proc/pid/maps and /proc/pid/smaps 10439a10064fSColin Cross and help identifying individual anonymous memory areas. 10449a10064fSColin Cross Assigning a name to anonymous virtual memory area might prevent that 10459a10064fSColin Cross area from being merged with adjacent virtual memory areas due to the 10469a10064fSColin Cross difference in their name. 10479a10064fSColin Cross 1048430529b5SPeter Xuconfig USERFAULTFD 1049430529b5SPeter Xu bool "Enable userfaultfd() system call" 1050430529b5SPeter Xu depends on MMU 1051430529b5SPeter Xu help 1052430529b5SPeter Xu Enable the userfaultfd() system call that allows to intercept and 1053430529b5SPeter Xu handle page faults in userland. 1054430529b5SPeter Xu 1055430529b5SPeter Xuconfig HAVE_ARCH_USERFAULTFD_WP 1056430529b5SPeter Xu bool 1057430529b5SPeter Xu help 1058430529b5SPeter Xu Arch has userfaultfd write protection support 1059430529b5SPeter Xu 1060430529b5SPeter Xuconfig HAVE_ARCH_USERFAULTFD_MINOR 1061430529b5SPeter Xu bool 1062430529b5SPeter Xu help 1063430529b5SPeter Xu Arch has userfaultfd minor fault support 1064430529b5SPeter Xu 1065679d1033SPeter Xuconfig PTE_MARKER 106681e0f15fSPeter Xu bool 1067679d1033SPeter Xu 1068679d1033SPeter Xu help 1069679d1033SPeter Xu Allows to create marker PTEs for file-backed memory. 1070679d1033SPeter Xu 10711db9dbc2SPeter Xuconfig PTE_MARKER_UFFD_WP 107281e0f15fSPeter Xu bool "Userfaultfd write protection support for shmem/hugetlbfs" 107381e0f15fSPeter Xu default y 107481e0f15fSPeter Xu depends on HAVE_ARCH_USERFAULTFD_WP 107581e0f15fSPeter Xu select PTE_MARKER 10761db9dbc2SPeter Xu 10771db9dbc2SPeter Xu help 10781db9dbc2SPeter Xu Allows to create marker PTEs for userfaultfd write protection 10791db9dbc2SPeter Xu purposes. It is required to enable userfaultfd write protection on 10801db9dbc2SPeter Xu file-backed memory types like shmem and hugetlbfs. 10811db9dbc2SPeter Xu 10822224d848SSeongJae Parksource "mm/damon/Kconfig" 10832224d848SSeongJae Park 108459e0b520SChristoph Hellwigendmenu 1085