1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 259e0b520SChristoph Hellwig 359e0b520SChristoph Hellwigmenu "Memory Management options" 459e0b520SChristoph Hellwig 5*7b42f104SJohannes Weiner# 6*7b42f104SJohannes Weiner# For some reason microblaze and nios2 hard code SWAP=n. Hopefully we can 7*7b42f104SJohannes Weiner# add proper SWAP support to them, in which case this can be remove. 8*7b42f104SJohannes Weiner# 9*7b42f104SJohannes Weinerconfig ARCH_NO_SWAP 10*7b42f104SJohannes Weiner bool 11*7b42f104SJohannes Weiner 12*7b42f104SJohannes Weinerconfig SWAP 13*7b42f104SJohannes Weiner bool "Support for paging of anonymous memory (swap)" 14*7b42f104SJohannes Weiner depends on MMU && BLOCK && !ARCH_NO_SWAP 15*7b42f104SJohannes Weiner default y 16*7b42f104SJohannes Weiner help 17*7b42f104SJohannes Weiner This option allows you to choose whether you want to have support 18*7b42f104SJohannes Weiner for so called swap devices or swap files in your kernel that are 19*7b42f104SJohannes Weiner used to provide more virtual memory than the actual RAM present 20*7b42f104SJohannes Weiner in your computer. If unsure say Y. 21*7b42f104SJohannes Weiner 22*7b42f104SJohannes Weinerchoice 23*7b42f104SJohannes Weiner prompt "Choose SLAB allocator" 24*7b42f104SJohannes Weiner default SLUB 25*7b42f104SJohannes Weiner help 26*7b42f104SJohannes Weiner This option allows to select a slab allocator. 27*7b42f104SJohannes Weiner 28*7b42f104SJohannes Weinerconfig SLAB 29*7b42f104SJohannes Weiner bool "SLAB" 30*7b42f104SJohannes Weiner depends on !PREEMPT_RT 31*7b42f104SJohannes Weiner select HAVE_HARDENED_USERCOPY_ALLOCATOR 32*7b42f104SJohannes Weiner help 33*7b42f104SJohannes Weiner The regular slab allocator that is established and known to work 34*7b42f104SJohannes Weiner well in all environments. It organizes cache hot objects in 35*7b42f104SJohannes Weiner per cpu and per node queues. 36*7b42f104SJohannes Weiner 37*7b42f104SJohannes Weinerconfig SLUB 38*7b42f104SJohannes Weiner bool "SLUB (Unqueued Allocator)" 39*7b42f104SJohannes Weiner select HAVE_HARDENED_USERCOPY_ALLOCATOR 40*7b42f104SJohannes Weiner help 41*7b42f104SJohannes Weiner SLUB is a slab allocator that minimizes cache line usage 42*7b42f104SJohannes Weiner instead of managing queues of cached objects (SLAB approach). 43*7b42f104SJohannes Weiner Per cpu caching is realized using slabs of objects instead 44*7b42f104SJohannes Weiner of queues of objects. SLUB can use memory efficiently 45*7b42f104SJohannes Weiner and has enhanced diagnostics. SLUB is the default choice for 46*7b42f104SJohannes Weiner a slab allocator. 47*7b42f104SJohannes Weiner 48*7b42f104SJohannes Weinerconfig SLOB 49*7b42f104SJohannes Weiner depends on EXPERT 50*7b42f104SJohannes Weiner bool "SLOB (Simple Allocator)" 51*7b42f104SJohannes Weiner depends on !PREEMPT_RT 52*7b42f104SJohannes Weiner help 53*7b42f104SJohannes Weiner SLOB replaces the stock allocator with a drastically simpler 54*7b42f104SJohannes Weiner allocator. SLOB is generally more space efficient but 55*7b42f104SJohannes Weiner does not perform as well on large systems. 56*7b42f104SJohannes Weiner 57*7b42f104SJohannes Weinerendchoice 58*7b42f104SJohannes Weiner 59*7b42f104SJohannes Weinerconfig SLAB_MERGE_DEFAULT 60*7b42f104SJohannes Weiner bool "Allow slab caches to be merged" 61*7b42f104SJohannes Weiner default y 62*7b42f104SJohannes Weiner depends on SLAB || SLUB 63*7b42f104SJohannes Weiner help 64*7b42f104SJohannes Weiner For reduced kernel memory fragmentation, slab caches can be 65*7b42f104SJohannes Weiner merged when they share the same size and other characteristics. 66*7b42f104SJohannes Weiner This carries a risk of kernel heap overflows being able to 67*7b42f104SJohannes Weiner overwrite objects from merged caches (and more easily control 68*7b42f104SJohannes Weiner cache layout), which makes such heap attacks easier to exploit 69*7b42f104SJohannes Weiner by attackers. By keeping caches unmerged, these kinds of exploits 70*7b42f104SJohannes Weiner can usually only damage objects in the same cache. To disable 71*7b42f104SJohannes Weiner merging at runtime, "slab_nomerge" can be passed on the kernel 72*7b42f104SJohannes Weiner command line. 73*7b42f104SJohannes Weiner 74*7b42f104SJohannes Weinerconfig SLAB_FREELIST_RANDOM 75*7b42f104SJohannes Weiner bool "Randomize slab freelist" 76*7b42f104SJohannes Weiner depends on SLAB || SLUB 77*7b42f104SJohannes Weiner help 78*7b42f104SJohannes Weiner Randomizes the freelist order used on creating new pages. This 79*7b42f104SJohannes Weiner security feature reduces the predictability of the kernel slab 80*7b42f104SJohannes Weiner allocator against heap overflows. 81*7b42f104SJohannes Weiner 82*7b42f104SJohannes Weinerconfig SLAB_FREELIST_HARDENED 83*7b42f104SJohannes Weiner bool "Harden slab freelist metadata" 84*7b42f104SJohannes Weiner depends on SLAB || SLUB 85*7b42f104SJohannes Weiner help 86*7b42f104SJohannes Weiner Many kernel heap attacks try to target slab cache metadata and 87*7b42f104SJohannes Weiner other infrastructure. This options makes minor performance 88*7b42f104SJohannes Weiner sacrifices to harden the kernel slab allocator against common 89*7b42f104SJohannes Weiner freelist exploit methods. Some slab implementations have more 90*7b42f104SJohannes Weiner sanity-checking than others. This option is most effective with 91*7b42f104SJohannes Weiner CONFIG_SLUB. 92*7b42f104SJohannes Weiner 93*7b42f104SJohannes Weinerconfig SHUFFLE_PAGE_ALLOCATOR 94*7b42f104SJohannes Weiner bool "Page allocator randomization" 95*7b42f104SJohannes Weiner default SLAB_FREELIST_RANDOM && ACPI_NUMA 96*7b42f104SJohannes Weiner help 97*7b42f104SJohannes Weiner Randomization of the page allocator improves the average 98*7b42f104SJohannes Weiner utilization of a direct-mapped memory-side-cache. See section 99*7b42f104SJohannes Weiner 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI 100*7b42f104SJohannes Weiner 6.2a specification for an example of how a platform advertises 101*7b42f104SJohannes Weiner the presence of a memory-side-cache. There are also incidental 102*7b42f104SJohannes Weiner security benefits as it reduces the predictability of page 103*7b42f104SJohannes Weiner allocations to compliment SLAB_FREELIST_RANDOM, but the 104*7b42f104SJohannes Weiner default granularity of shuffling on the "MAX_ORDER - 1" i.e, 105*7b42f104SJohannes Weiner 10th order of pages is selected based on cache utilization 106*7b42f104SJohannes Weiner benefits on x86. 107*7b42f104SJohannes Weiner 108*7b42f104SJohannes Weiner While the randomization improves cache utilization it may 109*7b42f104SJohannes Weiner negatively impact workloads on platforms without a cache. For 110*7b42f104SJohannes Weiner this reason, by default, the randomization is enabled only 111*7b42f104SJohannes Weiner after runtime detection of a direct-mapped memory-side-cache. 112*7b42f104SJohannes Weiner Otherwise, the randomization may be force enabled with the 113*7b42f104SJohannes Weiner 'page_alloc.shuffle' kernel command line parameter. 114*7b42f104SJohannes Weiner 115*7b42f104SJohannes Weiner Say Y if unsure. 116*7b42f104SJohannes Weiner 117*7b42f104SJohannes Weinerconfig SLUB_CPU_PARTIAL 118*7b42f104SJohannes Weiner default y 119*7b42f104SJohannes Weiner depends on SLUB && SMP 120*7b42f104SJohannes Weiner bool "SLUB per cpu partial cache" 121*7b42f104SJohannes Weiner help 122*7b42f104SJohannes Weiner Per cpu partial caches accelerate objects allocation and freeing 123*7b42f104SJohannes Weiner that is local to a processor at the price of more indeterminism 124*7b42f104SJohannes Weiner in the latency of the free. On overflow these caches will be cleared 125*7b42f104SJohannes Weiner which requires the taking of locks that may cause latency spikes. 126*7b42f104SJohannes Weiner Typically one would choose no for a realtime system. 127*7b42f104SJohannes Weiner 128e1785e85SDave Hansenconfig SELECT_MEMORY_MODEL 129e1785e85SDave Hansen def_bool y 130a8826eebSKees Cook depends on ARCH_SELECT_MEMORY_MODEL 131e1785e85SDave Hansen 1323a9da765SDave Hansenchoice 1333a9da765SDave Hansen prompt "Memory model" 134e1785e85SDave Hansen depends on SELECT_MEMORY_MODEL 135d41dee36SAndy Whitcroft default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT 136e1785e85SDave Hansen default FLATMEM_MANUAL 137d66d109dSMike Rapoport help 138d66d109dSMike Rapoport This option allows you to change some of the ways that 139d66d109dSMike Rapoport Linux manages its memory internally. Most users will 140d66d109dSMike Rapoport only have one option here selected by the architecture 141d66d109dSMike Rapoport configuration. This is normal. 1423a9da765SDave Hansen 143e1785e85SDave Hansenconfig FLATMEM_MANUAL 1443a9da765SDave Hansen bool "Flat Memory" 145bb1c50d3SMike Rapoport depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE 1463a9da765SDave Hansen help 147d66d109dSMike Rapoport This option is best suited for non-NUMA systems with 148d66d109dSMike Rapoport flat address space. The FLATMEM is the most efficient 149d66d109dSMike Rapoport system in terms of performance and resource consumption 150d66d109dSMike Rapoport and it is the best option for smaller systems. 1513a9da765SDave Hansen 152d66d109dSMike Rapoport For systems that have holes in their physical address 153d66d109dSMike Rapoport spaces and for features like NUMA and memory hotplug, 154dd33d29aSRandy Dunlap choose "Sparse Memory". 155d41dee36SAndy Whitcroft 156d41dee36SAndy Whitcroft If unsure, choose this option (Flat Memory) over any other. 1573a9da765SDave Hansen 158d41dee36SAndy Whitcroftconfig SPARSEMEM_MANUAL 159d41dee36SAndy Whitcroft bool "Sparse Memory" 160d41dee36SAndy Whitcroft depends on ARCH_SPARSEMEM_ENABLE 161d41dee36SAndy Whitcroft help 162d41dee36SAndy Whitcroft This will be the only option for some systems, including 163d66d109dSMike Rapoport memory hot-plug systems. This is normal. 164d41dee36SAndy Whitcroft 165d66d109dSMike Rapoport This option provides efficient support for systems with 166d66d109dSMike Rapoport holes is their physical address space and allows memory 167d66d109dSMike Rapoport hot-plug and hot-remove. 168d41dee36SAndy Whitcroft 169d66d109dSMike Rapoport If unsure, choose "Flat Memory" over this option. 170d41dee36SAndy Whitcroft 1713a9da765SDave Hansenendchoice 1723a9da765SDave Hansen 173d41dee36SAndy Whitcroftconfig SPARSEMEM 174d41dee36SAndy Whitcroft def_bool y 1751a83e175SRussell King depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL 176d41dee36SAndy Whitcroft 177e1785e85SDave Hansenconfig FLATMEM 178e1785e85SDave Hansen def_bool y 179bb1c50d3SMike Rapoport depends on !SPARSEMEM || FLATMEM_MANUAL 180d41dee36SAndy Whitcroft 18193b7504eSDave Hansen# 1823e347261SBob Picco# SPARSEMEM_EXTREME (which is the default) does some bootmem 183c89ab04fSMike Rapoport# allocations when sparse_init() is called. If this cannot 1843e347261SBob Picco# be done on your architecture, select this option. However, 1853e347261SBob Picco# statically allocating the mem_section[] array can potentially 1863e347261SBob Picco# consume vast quantities of .bss, so be careful. 1873e347261SBob Picco# 1883e347261SBob Picco# This option will also potentially produce smaller runtime code 1893e347261SBob Picco# with gcc 3.4 and later. 1903e347261SBob Picco# 1913e347261SBob Piccoconfig SPARSEMEM_STATIC 1929ba16087SJan Beulich bool 1933e347261SBob Picco 1943e347261SBob Picco# 19544c09201SMatt LaPlante# Architecture platforms which require a two level mem_section in SPARSEMEM 196802f192eSBob Picco# must select this option. This is usually for architecture platforms with 197802f192eSBob Picco# an extremely sparse physical address space. 198802f192eSBob Picco# 1993e347261SBob Piccoconfig SPARSEMEM_EXTREME 2003e347261SBob Picco def_bool y 2013e347261SBob Picco depends on SPARSEMEM && !SPARSEMEM_STATIC 2024c21e2f2SHugh Dickins 20329c71111SAndy Whitcroftconfig SPARSEMEM_VMEMMAP_ENABLE 2049ba16087SJan Beulich bool 20529c71111SAndy Whitcroft 20629c71111SAndy Whitcroftconfig SPARSEMEM_VMEMMAP 207a5ee6daaSGeoff Levand bool "Sparse Memory virtual memmap" 208a5ee6daaSGeoff Levand depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE 209a5ee6daaSGeoff Levand default y 210a5ee6daaSGeoff Levand help 211a5ee6daaSGeoff Levand SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise 212a5ee6daaSGeoff Levand pfn_to_page and page_to_pfn operations. This is the most 213a5ee6daaSGeoff Levand efficient option when sufficient kernel resources are available. 21429c71111SAndy Whitcroft 21570210ed9SPhilipp Hachtmannconfig HAVE_MEMBLOCK_PHYS_MAP 2166341e62bSChristoph Jaeger bool 21770210ed9SPhilipp Hachtmann 21867a929e0SChristoph Hellwigconfig HAVE_FAST_GUP 219050a9adcSChristoph Hellwig depends on MMU 2206341e62bSChristoph Jaeger bool 2212667f50eSSteve Capper 22252219aeaSDavid Hildenbrand# Don't discard allocated memory used to track "memory" and "reserved" memblocks 22352219aeaSDavid Hildenbrand# after early boot, so it can still be used to test for validity of memory. 22452219aeaSDavid Hildenbrand# Also, memblocks are updated with memory hot(un)plug. 225350e88baSMike Rapoportconfig ARCH_KEEP_MEMBLOCK 2266341e62bSChristoph Jaeger bool 227c378ddd5STejun Heo 2281e5d8e1eSDan Williams# Keep arch NUMA mapping infrastructure post-init. 2291e5d8e1eSDan Williamsconfig NUMA_KEEP_MEMINFO 2301e5d8e1eSDan Williams bool 2311e5d8e1eSDan Williams 232ee6f509cSMinchan Kimconfig MEMORY_ISOLATION 2336341e62bSChristoph Jaeger bool 234ee6f509cSMinchan Kim 235a9e7b8d4SDavid Hildenbrand# IORESOURCE_SYSTEM_RAM regions in the kernel resource tree that are marked 236a9e7b8d4SDavid Hildenbrand# IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via 237a9e7b8d4SDavid Hildenbrand# /dev/mem. 238a9e7b8d4SDavid Hildenbrandconfig EXCLUSIVE_SYSTEM_RAM 239a9e7b8d4SDavid Hildenbrand def_bool y 240a9e7b8d4SDavid Hildenbrand depends on !DEVMEM || STRICT_DEVMEM 241a9e7b8d4SDavid Hildenbrand 24246723bfaSYasuaki Ishimatsu# 24346723bfaSYasuaki Ishimatsu# Only be set on architectures that have completely implemented memory hotplug 24446723bfaSYasuaki Ishimatsu# feature. If you are not sure, don't touch it. 24546723bfaSYasuaki Ishimatsu# 24646723bfaSYasuaki Ishimatsuconfig HAVE_BOOTMEM_INFO_NODE 24746723bfaSYasuaki Ishimatsu def_bool n 24846723bfaSYasuaki Ishimatsu 24991024b3cSAnshuman Khandualconfig ARCH_ENABLE_MEMORY_HOTPLUG 25091024b3cSAnshuman Khandual bool 25191024b3cSAnshuman Khandual 2523947be19SDave Hansen# eventually, we can have this option just 'select SPARSEMEM' 2533947be19SDave Hansenconfig MEMORY_HOTPLUG 2543947be19SDave Hansen bool "Allow for memory hot-add" 255b30c5927SDavid Hildenbrand select MEMORY_ISOLATION 25671b6f2ddSDavid Hildenbrand depends on SPARSEMEM 25740b31360SStephen Rothwell depends on ARCH_ENABLE_MEMORY_HOTPLUG 2587ec58a2bSDavid Hildenbrand depends on 64BIT 2591e5d8e1eSDan Williams select NUMA_KEEP_MEMINFO if NUMA 2603947be19SDave Hansen 2618604d9e5SVitaly Kuznetsovconfig MEMORY_HOTPLUG_DEFAULT_ONLINE 2628604d9e5SVitaly Kuznetsov bool "Online the newly added memory blocks by default" 2638604d9e5SVitaly Kuznetsov depends on MEMORY_HOTPLUG 2648604d9e5SVitaly Kuznetsov help 2658604d9e5SVitaly Kuznetsov This option sets the default policy setting for memory hotplug 2668604d9e5SVitaly Kuznetsov onlining policy (/sys/devices/system/memory/auto_online_blocks) which 2678604d9e5SVitaly Kuznetsov determines what happens to newly added memory regions. Policy setting 2688604d9e5SVitaly Kuznetsov can always be changed at runtime. 269cb1aaebeSMauro Carvalho Chehab See Documentation/admin-guide/mm/memory-hotplug.rst for more information. 2708604d9e5SVitaly Kuznetsov 2718604d9e5SVitaly Kuznetsov Say Y here if you want all hot-plugged memory blocks to appear in 2728604d9e5SVitaly Kuznetsov 'online' state by default. 2738604d9e5SVitaly Kuznetsov Say N here if you want the default policy to keep all hot-plugged 2748604d9e5SVitaly Kuznetsov memory blocks in 'offline' state. 2758604d9e5SVitaly Kuznetsov 27691024b3cSAnshuman Khandualconfig ARCH_ENABLE_MEMORY_HOTREMOVE 27791024b3cSAnshuman Khandual bool 27891024b3cSAnshuman Khandual 2790c0e6195SKAMEZAWA Hiroyukiconfig MEMORY_HOTREMOVE 2800c0e6195SKAMEZAWA Hiroyuki bool "Allow for memory hot remove" 281f7e3334aSNathan Fontenot select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64) 2820c0e6195SKAMEZAWA Hiroyuki depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE 2830c0e6195SKAMEZAWA Hiroyuki depends on MIGRATION 2840c0e6195SKAMEZAWA Hiroyuki 285a08a2ae3SOscar Salvadorconfig MHP_MEMMAP_ON_MEMORY 286a08a2ae3SOscar Salvador def_bool y 287a08a2ae3SOscar Salvador depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP 288a08a2ae3SOscar Salvador depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE 289a08a2ae3SOscar Salvador 2904c21e2f2SHugh Dickins# Heavily threaded applications may benefit from splitting the mm-wide 2914c21e2f2SHugh Dickins# page_table_lock, so that faults on different parts of the user address 2924c21e2f2SHugh Dickins# space can be handled with less contention: split it at this NR_CPUS. 2934c21e2f2SHugh Dickins# Default to 4 for wider testing, though 8 might be more appropriate. 2944c21e2f2SHugh Dickins# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock. 2957b6ac9dfSHugh Dickins# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes. 29660bccaa6SWill Deacon# SPARC32 allocates multiple pte tables within a single page, and therefore 29760bccaa6SWill Deacon# a per-page lock leads to problems when multiple tables need to be locked 29860bccaa6SWill Deacon# at the same time (e.g. copy_page_range()). 299a70caa8bSHugh Dickins# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page. 3004c21e2f2SHugh Dickins# 3014c21e2f2SHugh Dickinsconfig SPLIT_PTLOCK_CPUS 3024c21e2f2SHugh Dickins int 3039164550eSKirill A. Shutemov default "999999" if !MMU 304a70caa8bSHugh Dickins default "999999" if ARM && !CPU_CACHE_VIPT 305a70caa8bSHugh Dickins default "999999" if PARISC && !PA20 30660bccaa6SWill Deacon default "999999" if SPARC32 3074c21e2f2SHugh Dickins default "4" 3087cbe34cfSChristoph Lameter 309e009bb30SKirill A. Shutemovconfig ARCH_ENABLE_SPLIT_PMD_PTLOCK 3106341e62bSChristoph Jaeger bool 311e009bb30SKirill A. Shutemov 3127cbe34cfSChristoph Lameter# 31309316c09SKonstantin Khlebnikov# support for memory balloon 31409316c09SKonstantin Khlebnikovconfig MEMORY_BALLOON 3156341e62bSChristoph Jaeger bool 31609316c09SKonstantin Khlebnikov 31709316c09SKonstantin Khlebnikov# 31818468d93SRafael Aquini# support for memory balloon compaction 31918468d93SRafael Aquiniconfig BALLOON_COMPACTION 32018468d93SRafael Aquini bool "Allow for balloon memory compaction/migration" 32118468d93SRafael Aquini def_bool y 32209316c09SKonstantin Khlebnikov depends on COMPACTION && MEMORY_BALLOON 32318468d93SRafael Aquini help 32418468d93SRafael Aquini Memory fragmentation introduced by ballooning might reduce 32518468d93SRafael Aquini significantly the number of 2MB contiguous memory blocks that can be 32618468d93SRafael Aquini used within a guest, thus imposing performance penalties associated 32718468d93SRafael Aquini with the reduced number of transparent huge pages that could be used 32818468d93SRafael Aquini by the guest workload. Allowing the compaction & migration for memory 32918468d93SRafael Aquini pages enlisted as being part of memory balloon devices avoids the 33018468d93SRafael Aquini scenario aforementioned and helps improving memory defragmentation. 33118468d93SRafael Aquini 33218468d93SRafael Aquini# 333e9e96b39SMel Gorman# support for memory compaction 334e9e96b39SMel Gormanconfig COMPACTION 335e9e96b39SMel Gorman bool "Allow for memory compaction" 33605106e6aSRik van Riel def_bool y 337e9e96b39SMel Gorman select MIGRATION 33833a93877SAndrea Arcangeli depends on MMU 339e9e96b39SMel Gorman help 340b32eaf71SMichal Hocko Compaction is the only memory management component to form 341b32eaf71SMichal Hocko high order (larger physically contiguous) memory blocks 342b32eaf71SMichal Hocko reliably. The page allocator relies on compaction heavily and 343b32eaf71SMichal Hocko the lack of the feature can lead to unexpected OOM killer 344b32eaf71SMichal Hocko invocations for high order memory requests. You shouldn't 345b32eaf71SMichal Hocko disable this option unless there really is a strong reason for 346b32eaf71SMichal Hocko it and then we would be really interested to hear about that at 347b32eaf71SMichal Hocko linux-mm@kvack.org. 348e9e96b39SMel Gorman 349e9e96b39SMel Gorman# 35036e66c55SAlexander Duyck# support for free page reporting 35136e66c55SAlexander Duyckconfig PAGE_REPORTING 35236e66c55SAlexander Duyck bool "Free page reporting" 35336e66c55SAlexander Duyck def_bool n 35436e66c55SAlexander Duyck help 35536e66c55SAlexander Duyck Free page reporting allows for the incremental acquisition of 35636e66c55SAlexander Duyck free pages from the buddy allocator for the purpose of reporting 35736e66c55SAlexander Duyck those pages to another entity, such as a hypervisor, so that the 35836e66c55SAlexander Duyck memory can be freed within the host for other uses. 35936e66c55SAlexander Duyck 36036e66c55SAlexander Duyck# 3617cbe34cfSChristoph Lameter# support for page migration 3627cbe34cfSChristoph Lameter# 3637cbe34cfSChristoph Lameterconfig MIGRATION 364b20a3503SChristoph Lameter bool "Page migration" 3656c5240aeSChristoph Lameter def_bool y 366de32a817SChen Gang depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU 367b20a3503SChristoph Lameter help 368b20a3503SChristoph Lameter Allows the migration of the physical location of pages of processes 369e9e96b39SMel Gorman while the virtual addresses are not changed. This is useful in 370e9e96b39SMel Gorman two situations. The first is on NUMA systems to put pages nearer 371e9e96b39SMel Gorman to the processors accessing. The second is when allocating huge 372e9e96b39SMel Gorman pages as migration can relocate pages to satisfy a huge page 373e9e96b39SMel Gorman allocation instead of reclaiming. 3746550e07fSGreg Kroah-Hartman 37576cbbeadSChristoph Hellwigconfig DEVICE_MIGRATION 376d90a25f8SChristoph Hellwig def_bool MIGRATION && ZONE_DEVICE 37776cbbeadSChristoph Hellwig 378c177c81eSNaoya Horiguchiconfig ARCH_ENABLE_HUGEPAGE_MIGRATION 3796341e62bSChristoph Jaeger bool 380c177c81eSNaoya Horiguchi 3819c670ea3SNaoya Horiguchiconfig ARCH_ENABLE_THP_MIGRATION 3829c670ea3SNaoya Horiguchi bool 3839c670ea3SNaoya Horiguchi 3844bfb68a0SAnshuman Khandualconfig HUGETLB_PAGE_SIZE_VARIABLE 3854bfb68a0SAnshuman Khandual def_bool n 3864bfb68a0SAnshuman Khandual help 3874bfb68a0SAnshuman Khandual Allows the pageblock_order value to be dynamic instead of just standard 3884bfb68a0SAnshuman Khandual HUGETLB_PAGE_ORDER when there are multiple HugeTLB page sizes available 3894bfb68a0SAnshuman Khandual on a platform. 3904bfb68a0SAnshuman Khandual 391b3d40a2bSDavid Hildenbrand Note that the pageblock_order cannot exceed MAX_ORDER - 1 and will be 392b3d40a2bSDavid Hildenbrand clamped down to MAX_ORDER - 1. 393b3d40a2bSDavid Hildenbrand 3948df995f6SAlexandre Ghiticonfig CONTIG_ALLOC 3958df995f6SAlexandre Ghiti def_bool (MEMORY_ISOLATION && COMPACTION) || CMA 3968df995f6SAlexandre Ghiti 397600715dcSJeremy Fitzhardingeconfig PHYS_ADDR_T_64BIT 398d4a451d5SChristoph Hellwig def_bool 64BIT 399600715dcSJeremy Fitzhardinge 4002a7326b5SChristoph Lameterconfig BOUNCE 4019ca24e2eSVinayak Menon bool "Enable bounce buffers" 4029ca24e2eSVinayak Menon default y 403ce288e05SChristoph Hellwig depends on BLOCK && MMU && HIGHMEM 4049ca24e2eSVinayak Menon help 405ce288e05SChristoph Hellwig Enable bounce buffers for devices that cannot access the full range of 406ce288e05SChristoph Hellwig memory available to the CPU. Enabled by default when HIGHMEM is 407ce288e05SChristoph Hellwig selected, but you may say n to override this. 4082a7326b5SChristoph Lameter 409f057eac0SStephen Rothwellconfig VIRT_TO_BUS 4104febd95aSStephen Rothwell bool 4114febd95aSStephen Rothwell help 4124febd95aSStephen Rothwell An architecture should select this if it implements the 4134febd95aSStephen Rothwell deprecated interface virt_to_bus(). All new architectures 4144febd95aSStephen Rothwell should probably not select this. 4154febd95aSStephen Rothwell 416cddb8a5cSAndrea Arcangeli 417cddb8a5cSAndrea Arcangeliconfig MMU_NOTIFIER 418cddb8a5cSAndrea Arcangeli bool 41983fe27eaSPranith Kumar select SRCU 42099cb252fSJason Gunthorpe select INTERVAL_TREE 421fc4d5c29SDavid Howells 422f8af4da3SHugh Dickinsconfig KSM 423f8af4da3SHugh Dickins bool "Enable KSM for page merging" 424f8af4da3SHugh Dickins depends on MMU 42559e1a2f4STimofey Titovets select XXHASH 426f8af4da3SHugh Dickins help 427f8af4da3SHugh Dickins Enable Kernel Samepage Merging: KSM periodically scans those areas 428f8af4da3SHugh Dickins of an application's address space that an app has advised may be 429f8af4da3SHugh Dickins mergeable. When it finds pages of identical content, it replaces 430d0f209f6SHugh Dickins the many instances by a single page with that content, so 431f8af4da3SHugh Dickins saving memory until one or another app needs to modify the content. 432f8af4da3SHugh Dickins Recommended for use with KVM, or with other duplicative applications. 433ad56b738SMike Rapoport See Documentation/vm/ksm.rst for more information: KSM is inactive 434c73602adSHugh Dickins until a program has madvised that an area is MADV_MERGEABLE, and 435c73602adSHugh Dickins root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set). 436f8af4da3SHugh Dickins 437e0a94c2aSChristoph Lameterconfig DEFAULT_MMAP_MIN_ADDR 438e0a94c2aSChristoph Lameter int "Low address space to protect from user allocation" 4396e141546SDavid Howells depends on MMU 440e0a94c2aSChristoph Lameter default 4096 441e0a94c2aSChristoph Lameter help 442e0a94c2aSChristoph Lameter This is the portion of low virtual memory which should be protected 443e0a94c2aSChristoph Lameter from userspace allocation. Keeping a user from writing to low pages 444e0a94c2aSChristoph Lameter can help reduce the impact of kernel NULL pointer bugs. 445e0a94c2aSChristoph Lameter 446e0a94c2aSChristoph Lameter For most ia64, ppc64 and x86 users with lots of address space 447e0a94c2aSChristoph Lameter a value of 65536 is reasonable and should cause no problems. 448e0a94c2aSChristoph Lameter On arm and other archs it should not be higher than 32768. 449788084abSEric Paris Programs which use vm86 functionality or have some need to map 450788084abSEric Paris this low address space will need CAP_SYS_RAWIO or disable this 451788084abSEric Paris protection by setting the value to 0. 452e0a94c2aSChristoph Lameter 453e0a94c2aSChristoph Lameter This value can be changed after boot using the 454e0a94c2aSChristoph Lameter /proc/sys/vm/mmap_min_addr tunable. 455e0a94c2aSChristoph Lameter 456d949f36fSLinus Torvaldsconfig ARCH_SUPPORTS_MEMORY_FAILURE 457d949f36fSLinus Torvalds bool 458e0a94c2aSChristoph Lameter 4596a46079cSAndi Kleenconfig MEMORY_FAILURE 4606a46079cSAndi Kleen depends on MMU 461d949f36fSLinus Torvalds depends on ARCH_SUPPORTS_MEMORY_FAILURE 4626a46079cSAndi Kleen bool "Enable recovery from hardware memory errors" 463ee6f509cSMinchan Kim select MEMORY_ISOLATION 46497f0b134SXie XiuQi select RAS 4656a46079cSAndi Kleen help 4666a46079cSAndi Kleen Enables code to recover from some memory failures on systems 4676a46079cSAndi Kleen with MCA recovery. This allows a system to continue running 4686a46079cSAndi Kleen even when some of its memory has uncorrected errors. This requires 4696a46079cSAndi Kleen special hardware support and typically ECC memory. 4706a46079cSAndi Kleen 471cae681fcSAndi Kleenconfig HWPOISON_INJECT 472413f9efbSAndi Kleen tristate "HWPoison pages injector" 47327df5068SAndi Kleen depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS 474478c5ffcSWu Fengguang select PROC_PAGE_MONITOR 475cae681fcSAndi Kleen 476fc4d5c29SDavid Howellsconfig NOMMU_INITIAL_TRIM_EXCESS 477fc4d5c29SDavid Howells int "Turn on mmap() excess space trimming before booting" 478fc4d5c29SDavid Howells depends on !MMU 479fc4d5c29SDavid Howells default 1 480fc4d5c29SDavid Howells help 481fc4d5c29SDavid Howells The NOMMU mmap() frequently needs to allocate large contiguous chunks 482fc4d5c29SDavid Howells of memory on which to store mappings, but it can only ask the system 483fc4d5c29SDavid Howells allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently 484fc4d5c29SDavid Howells more than it requires. To deal with this, mmap() is able to trim off 485fc4d5c29SDavid Howells the excess and return it to the allocator. 486fc4d5c29SDavid Howells 487fc4d5c29SDavid Howells If trimming is enabled, the excess is trimmed off and returned to the 488fc4d5c29SDavid Howells system allocator, which can cause extra fragmentation, particularly 489fc4d5c29SDavid Howells if there are a lot of transient processes. 490fc4d5c29SDavid Howells 491fc4d5c29SDavid Howells If trimming is disabled, the excess is kept, but not used, which for 492fc4d5c29SDavid Howells long-term mappings means that the space is wasted. 493fc4d5c29SDavid Howells 494fc4d5c29SDavid Howells Trimming can be dynamically controlled through a sysctl option 495fc4d5c29SDavid Howells (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of 496fc4d5c29SDavid Howells excess pages there must be before trimming should occur, or zero if 497fc4d5c29SDavid Howells no trimming is to occur. 498fc4d5c29SDavid Howells 499fc4d5c29SDavid Howells This option specifies the initial value of this option. The default 500fc4d5c29SDavid Howells of 1 says that all excess pages should be trimmed. 501fc4d5c29SDavid Howells 502dd19d293SStephen Kitt See Documentation/admin-guide/mm/nommu-mmap.rst for more information. 503bbddff05STejun Heo 5044c76d9d1SAndrea Arcangeliconfig TRANSPARENT_HUGEPAGE 50513ece886SAndrea Arcangeli bool "Transparent Hugepage Support" 506554b0f3cSSebastian Andrzej Siewior depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE && !PREEMPT_RT 5075d689240SAndrea Arcangeli select COMPACTION 5083a08cd52SMatthew Wilcox select XARRAY_MULTI 5094c76d9d1SAndrea Arcangeli help 5104c76d9d1SAndrea Arcangeli Transparent Hugepages allows the kernel to use huge pages and 5114c76d9d1SAndrea Arcangeli huge tlb transparently to the applications whenever possible. 5124c76d9d1SAndrea Arcangeli This feature can improve computing performance to certain 5134c76d9d1SAndrea Arcangeli applications by speeding up page faults during memory 5144c76d9d1SAndrea Arcangeli allocation, by reducing the number of tlb misses and by speeding 5154c76d9d1SAndrea Arcangeli up the pagetable walking. 5164c76d9d1SAndrea Arcangeli 5174c76d9d1SAndrea Arcangeli If memory constrained on embedded, you may want to say N. 5184c76d9d1SAndrea Arcangeli 51913ece886SAndrea Arcangelichoice 52013ece886SAndrea Arcangeli prompt "Transparent Hugepage Support sysfs defaults" 52113ece886SAndrea Arcangeli depends on TRANSPARENT_HUGEPAGE 52213ece886SAndrea Arcangeli default TRANSPARENT_HUGEPAGE_ALWAYS 52313ece886SAndrea Arcangeli help 52413ece886SAndrea Arcangeli Selects the sysfs defaults for Transparent Hugepage Support. 52513ece886SAndrea Arcangeli 52613ece886SAndrea Arcangeli config TRANSPARENT_HUGEPAGE_ALWAYS 52713ece886SAndrea Arcangeli bool "always" 52813ece886SAndrea Arcangeli help 52913ece886SAndrea Arcangeli Enabling Transparent Hugepage always, can increase the 53013ece886SAndrea Arcangeli memory footprint of applications without a guaranteed 53113ece886SAndrea Arcangeli benefit but it will work automatically for all applications. 53213ece886SAndrea Arcangeli 53313ece886SAndrea Arcangeli config TRANSPARENT_HUGEPAGE_MADVISE 53413ece886SAndrea Arcangeli bool "madvise" 53513ece886SAndrea Arcangeli help 53613ece886SAndrea Arcangeli Enabling Transparent Hugepage madvise, will only provide a 53713ece886SAndrea Arcangeli performance improvement benefit to the applications using 53813ece886SAndrea Arcangeli madvise(MADV_HUGEPAGE) but it won't risk to increase the 53913ece886SAndrea Arcangeli memory footprint of applications without a guaranteed 54013ece886SAndrea Arcangeli benefit. 54113ece886SAndrea Arcangeliendchoice 54213ece886SAndrea Arcangeli 54307431506SAnshuman Khandualconfig ARCH_WANT_GENERAL_HUGETLB 54407431506SAnshuman Khandual bool 54507431506SAnshuman Khandual 54638d8b4e6SHuang Yingconfig ARCH_WANTS_THP_SWAP 54738d8b4e6SHuang Ying def_bool n 54838d8b4e6SHuang Ying 54938d8b4e6SHuang Yingconfig THP_SWAP 55038d8b4e6SHuang Ying def_bool y 55114fef284SHuang Ying depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP 55238d8b4e6SHuang Ying help 55338d8b4e6SHuang Ying Swap transparent huge pages in one piece, without splitting. 55414fef284SHuang Ying XXX: For now, swap cluster backing transparent huge page 55514fef284SHuang Ying will be split after swapout. 55638d8b4e6SHuang Ying 55738d8b4e6SHuang Ying For selection by architectures with reasonable THP sizes. 55838d8b4e6SHuang Ying 559e496cf3dSKirill A. Shutemov# 560bbddff05STejun Heo# UP and nommu archs use km based percpu allocator 561bbddff05STejun Heo# 562bbddff05STejun Heoconfig NEED_PER_CPU_KM 5633583521aSVladimir Murzin depends on !SMP || !MMU 564bbddff05STejun Heo bool 565bbddff05STejun Heo default y 566077b1f83SDan Magenheimer 5677ecd19cfSKefeng Wangconfig NEED_PER_CPU_EMBED_FIRST_CHUNK 5687ecd19cfSKefeng Wang bool 5697ecd19cfSKefeng Wang 5707ecd19cfSKefeng Wangconfig NEED_PER_CPU_PAGE_FIRST_CHUNK 5717ecd19cfSKefeng Wang bool 5727ecd19cfSKefeng Wang 5737ecd19cfSKefeng Wangconfig USE_PERCPU_NUMA_NODE_ID 5747ecd19cfSKefeng Wang bool 5757ecd19cfSKefeng Wang 5767ecd19cfSKefeng Wangconfig HAVE_SETUP_PER_CPU_AREA 5777ecd19cfSKefeng Wang bool 5787ecd19cfSKefeng Wang 57927c6aec2SDan Magenheimerconfig FRONTSWAP 5806e61dde8SChristoph Hellwig bool 581f825c736SAneesh Kumar K.V 582f825c736SAneesh Kumar K.Vconfig CMA 583f825c736SAneesh Kumar K.V bool "Contiguous Memory Allocator" 584aca52c39SMike Rapoport depends on MMU 585f825c736SAneesh Kumar K.V select MIGRATION 586f825c736SAneesh Kumar K.V select MEMORY_ISOLATION 587f825c736SAneesh Kumar K.V help 588f825c736SAneesh Kumar K.V This enables the Contiguous Memory Allocator which allows other 589f825c736SAneesh Kumar K.V subsystems to allocate big physically-contiguous blocks of memory. 590f825c736SAneesh Kumar K.V CMA reserves a region of memory and allows only movable pages to 591f825c736SAneesh Kumar K.V be allocated from it. This way, the kernel can use the memory for 592f825c736SAneesh Kumar K.V pagecache and when a subsystem requests for contiguous area, the 593f825c736SAneesh Kumar K.V allocated pages are migrated away to serve the contiguous request. 594f825c736SAneesh Kumar K.V 595f825c736SAneesh Kumar K.V If unsure, say "n". 596f825c736SAneesh Kumar K.V 597f825c736SAneesh Kumar K.Vconfig CMA_DEBUG 598f825c736SAneesh Kumar K.V bool "CMA debug messages (DEVELOPMENT)" 599f825c736SAneesh Kumar K.V depends on DEBUG_KERNEL && CMA 600f825c736SAneesh Kumar K.V help 601f825c736SAneesh Kumar K.V Turns on debug messages in CMA. This produces KERN_DEBUG 602f825c736SAneesh Kumar K.V messages for every CMA call as well as various messages while 603f825c736SAneesh Kumar K.V processing calls such as dma_alloc_from_contiguous(). 604f825c736SAneesh Kumar K.V This option does not affect warning and error messages. 605bf550fc9SAlexander Graf 60628b24c1fSSasha Levinconfig CMA_DEBUGFS 60728b24c1fSSasha Levin bool "CMA debugfs interface" 60828b24c1fSSasha Levin depends on CMA && DEBUG_FS 60928b24c1fSSasha Levin help 61028b24c1fSSasha Levin Turns on the DebugFS interface for CMA. 61128b24c1fSSasha Levin 61243ca106fSMinchan Kimconfig CMA_SYSFS 61343ca106fSMinchan Kim bool "CMA information through sysfs interface" 61443ca106fSMinchan Kim depends on CMA && SYSFS 61543ca106fSMinchan Kim help 61643ca106fSMinchan Kim This option exposes some sysfs attributes to get information 61743ca106fSMinchan Kim from CMA. 61843ca106fSMinchan Kim 619a254129eSJoonsoo Kimconfig CMA_AREAS 620a254129eSJoonsoo Kim int "Maximum count of the CMA areas" 621a254129eSJoonsoo Kim depends on CMA 622b7176c26SBarry Song default 19 if NUMA 623a254129eSJoonsoo Kim default 7 624a254129eSJoonsoo Kim help 625a254129eSJoonsoo Kim CMA allows to create CMA areas for particular purpose, mainly, 626a254129eSJoonsoo Kim used as device private area. This parameter sets the maximum 627a254129eSJoonsoo Kim number of CMA area in the system. 628a254129eSJoonsoo Kim 629b7176c26SBarry Song If unsure, leave the default value "7" in UMA and "19" in NUMA. 630a254129eSJoonsoo Kim 631af8d417aSDan Streetmanconfig MEM_SOFT_DIRTY 632af8d417aSDan Streetman bool "Track memory changes" 633af8d417aSDan Streetman depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS 634af8d417aSDan Streetman select PROC_PAGE_MONITOR 6354e2e2770SSeth Jennings help 636af8d417aSDan Streetman This option enables memory changes tracking by introducing a 637af8d417aSDan Streetman soft-dirty bit on pte-s. This bit it set when someone writes 638af8d417aSDan Streetman into a page just as regular dirty bit, but unlike the latter 639af8d417aSDan Streetman it can be cleared by hands. 640af8d417aSDan Streetman 6411ad1335dSMike Rapoport See Documentation/admin-guide/mm/soft-dirty.rst for more details. 6424e2e2770SSeth Jennings 6432b281117SSeth Jenningsconfig ZSWAP 6442b281117SSeth Jennings bool "Compressed cache for swap pages (EXPERIMENTAL)" 6456e61dde8SChristoph Hellwig depends on SWAP && CRYPTO=y 6466e61dde8SChristoph Hellwig select FRONTSWAP 64712d79d64SDan Streetman select ZPOOL 6482b281117SSeth Jennings help 6492b281117SSeth Jennings A lightweight compressed cache for swap pages. It takes 6502b281117SSeth Jennings pages that are in the process of being swapped out and attempts to 6512b281117SSeth Jennings compress them into a dynamically allocated RAM-based memory pool. 6522b281117SSeth Jennings This can result in a significant I/O reduction on swap device and, 6532b281117SSeth Jennings in the case where decompressing from RAM is faster that swap device 6542b281117SSeth Jennings reads, can also improve workload performance. 6552b281117SSeth Jennings 6562b281117SSeth Jennings This is marked experimental because it is a new feature (as of 6572b281117SSeth Jennings v3.11) that interacts heavily with memory reclaim. While these 6582b281117SSeth Jennings interactions don't cause any known issues on simple memory setups, 6592b281117SSeth Jennings they have not be fully explored on the large set of potential 6602b281117SSeth Jennings configurations and workloads that exist. 6612b281117SSeth Jennings 662bb8b93b5SMaciej S. Szmigierochoice 663bb8b93b5SMaciej S. Szmigiero prompt "Compressed cache for swap pages default compressor" 664bb8b93b5SMaciej S. Szmigiero depends on ZSWAP 665bb8b93b5SMaciej S. Szmigiero default ZSWAP_COMPRESSOR_DEFAULT_LZO 666bb8b93b5SMaciej S. Szmigiero help 667bb8b93b5SMaciej S. Szmigiero Selects the default compression algorithm for the compressed cache 668bb8b93b5SMaciej S. Szmigiero for swap pages. 669bb8b93b5SMaciej S. Szmigiero 670bb8b93b5SMaciej S. Szmigiero For an overview what kind of performance can be expected from 671bb8b93b5SMaciej S. Szmigiero a particular compression algorithm please refer to the benchmarks 672bb8b93b5SMaciej S. Szmigiero available at the following LWN page: 673bb8b93b5SMaciej S. Szmigiero https://lwn.net/Articles/751795/ 674bb8b93b5SMaciej S. Szmigiero 675bb8b93b5SMaciej S. Szmigiero If in doubt, select 'LZO'. 676bb8b93b5SMaciej S. Szmigiero 677bb8b93b5SMaciej S. Szmigiero The selection made here can be overridden by using the kernel 678bb8b93b5SMaciej S. Szmigiero command line 'zswap.compressor=' option. 679bb8b93b5SMaciej S. Szmigiero 680bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_DEFLATE 681bb8b93b5SMaciej S. Szmigiero bool "Deflate" 682bb8b93b5SMaciej S. Szmigiero select CRYPTO_DEFLATE 683bb8b93b5SMaciej S. Szmigiero help 684bb8b93b5SMaciej S. Szmigiero Use the Deflate algorithm as the default compression algorithm. 685bb8b93b5SMaciej S. Szmigiero 686bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_LZO 687bb8b93b5SMaciej S. Szmigiero bool "LZO" 688bb8b93b5SMaciej S. Szmigiero select CRYPTO_LZO 689bb8b93b5SMaciej S. Szmigiero help 690bb8b93b5SMaciej S. Szmigiero Use the LZO algorithm as the default compression algorithm. 691bb8b93b5SMaciej S. Szmigiero 692bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_842 693bb8b93b5SMaciej S. Szmigiero bool "842" 694bb8b93b5SMaciej S. Szmigiero select CRYPTO_842 695bb8b93b5SMaciej S. Szmigiero help 696bb8b93b5SMaciej S. Szmigiero Use the 842 algorithm as the default compression algorithm. 697bb8b93b5SMaciej S. Szmigiero 698bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4 699bb8b93b5SMaciej S. Szmigiero bool "LZ4" 700bb8b93b5SMaciej S. Szmigiero select CRYPTO_LZ4 701bb8b93b5SMaciej S. Szmigiero help 702bb8b93b5SMaciej S. Szmigiero Use the LZ4 algorithm as the default compression algorithm. 703bb8b93b5SMaciej S. Szmigiero 704bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4HC 705bb8b93b5SMaciej S. Szmigiero bool "LZ4HC" 706bb8b93b5SMaciej S. Szmigiero select CRYPTO_LZ4HC 707bb8b93b5SMaciej S. Szmigiero help 708bb8b93b5SMaciej S. Szmigiero Use the LZ4HC algorithm as the default compression algorithm. 709bb8b93b5SMaciej S. Szmigiero 710bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT_ZSTD 711bb8b93b5SMaciej S. Szmigiero bool "zstd" 712bb8b93b5SMaciej S. Szmigiero select CRYPTO_ZSTD 713bb8b93b5SMaciej S. Szmigiero help 714bb8b93b5SMaciej S. Szmigiero Use the zstd algorithm as the default compression algorithm. 715bb8b93b5SMaciej S. Szmigieroendchoice 716bb8b93b5SMaciej S. Szmigiero 717bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_COMPRESSOR_DEFAULT 718bb8b93b5SMaciej S. Szmigiero string 719bb8b93b5SMaciej S. Szmigiero depends on ZSWAP 720bb8b93b5SMaciej S. Szmigiero default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE 721bb8b93b5SMaciej S. Szmigiero default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO 722bb8b93b5SMaciej S. Szmigiero default "842" if ZSWAP_COMPRESSOR_DEFAULT_842 723bb8b93b5SMaciej S. Szmigiero default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4 724bb8b93b5SMaciej S. Szmigiero default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC 725bb8b93b5SMaciej S. Szmigiero default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD 726bb8b93b5SMaciej S. Szmigiero default "" 727bb8b93b5SMaciej S. Szmigiero 728bb8b93b5SMaciej S. Szmigierochoice 729bb8b93b5SMaciej S. Szmigiero prompt "Compressed cache for swap pages default allocator" 730bb8b93b5SMaciej S. Szmigiero depends on ZSWAP 731bb8b93b5SMaciej S. Szmigiero default ZSWAP_ZPOOL_DEFAULT_ZBUD 732bb8b93b5SMaciej S. Szmigiero help 733bb8b93b5SMaciej S. Szmigiero Selects the default allocator for the compressed cache for 734bb8b93b5SMaciej S. Szmigiero swap pages. 735bb8b93b5SMaciej S. Szmigiero The default is 'zbud' for compatibility, however please do 736bb8b93b5SMaciej S. Szmigiero read the description of each of the allocators below before 737bb8b93b5SMaciej S. Szmigiero making a right choice. 738bb8b93b5SMaciej S. Szmigiero 739bb8b93b5SMaciej S. Szmigiero The selection made here can be overridden by using the kernel 740bb8b93b5SMaciej S. Szmigiero command line 'zswap.zpool=' option. 741bb8b93b5SMaciej S. Szmigiero 742bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_ZPOOL_DEFAULT_ZBUD 743bb8b93b5SMaciej S. Szmigiero bool "zbud" 744bb8b93b5SMaciej S. Szmigiero select ZBUD 745bb8b93b5SMaciej S. Szmigiero help 746bb8b93b5SMaciej S. Szmigiero Use the zbud allocator as the default allocator. 747bb8b93b5SMaciej S. Szmigiero 748bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_ZPOOL_DEFAULT_Z3FOLD 749bb8b93b5SMaciej S. Szmigiero bool "z3fold" 750bb8b93b5SMaciej S. Szmigiero select Z3FOLD 751bb8b93b5SMaciej S. Szmigiero help 752bb8b93b5SMaciej S. Szmigiero Use the z3fold allocator as the default allocator. 753bb8b93b5SMaciej S. Szmigiero 754bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_ZPOOL_DEFAULT_ZSMALLOC 755bb8b93b5SMaciej S. Szmigiero bool "zsmalloc" 756bb8b93b5SMaciej S. Szmigiero select ZSMALLOC 757bb8b93b5SMaciej S. Szmigiero help 758bb8b93b5SMaciej S. Szmigiero Use the zsmalloc allocator as the default allocator. 759bb8b93b5SMaciej S. Szmigieroendchoice 760bb8b93b5SMaciej S. Szmigiero 761bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_ZPOOL_DEFAULT 762bb8b93b5SMaciej S. Szmigiero string 763bb8b93b5SMaciej S. Szmigiero depends on ZSWAP 764bb8b93b5SMaciej S. Szmigiero default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD 765bb8b93b5SMaciej S. Szmigiero default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD 766bb8b93b5SMaciej S. Szmigiero default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC 767bb8b93b5SMaciej S. Szmigiero default "" 768bb8b93b5SMaciej S. Szmigiero 769bb8b93b5SMaciej S. Szmigieroconfig ZSWAP_DEFAULT_ON 770bb8b93b5SMaciej S. Szmigiero bool "Enable the compressed cache for swap pages by default" 771bb8b93b5SMaciej S. Szmigiero depends on ZSWAP 772bb8b93b5SMaciej S. Szmigiero help 773bb8b93b5SMaciej S. Szmigiero If selected, the compressed cache for swap pages will be enabled 774bb8b93b5SMaciej S. Szmigiero at boot, otherwise it will be disabled. 775bb8b93b5SMaciej S. Szmigiero 776bb8b93b5SMaciej S. Szmigiero The selection made here can be overridden by using the kernel 777bb8b93b5SMaciej S. Szmigiero command line 'zswap.enabled=' option. 778bb8b93b5SMaciej S. Szmigiero 779af8d417aSDan Streetmanconfig ZPOOL 780af8d417aSDan Streetman tristate "Common API for compressed memory storage" 7810f8975ecSPavel Emelyanov help 782af8d417aSDan Streetman Compressed memory storage API. This allows using either zbud or 783af8d417aSDan Streetman zsmalloc. 7840f8975ecSPavel Emelyanov 785af8d417aSDan Streetmanconfig ZBUD 7869a001fc1SVitaly Wool tristate "Low (Up to 2x) density storage for compressed pages" 7872a03085cSMiaohe Lin depends on ZPOOL 788af8d417aSDan Streetman help 789af8d417aSDan Streetman A special purpose allocator for storing compressed pages. 790af8d417aSDan Streetman It is designed to store up to two compressed pages per physical 791af8d417aSDan Streetman page. While this design limits storage density, it has simple and 792af8d417aSDan Streetman deterministic reclaim properties that make it preferable to a higher 793af8d417aSDan Streetman density approach when reclaim will be used. 794bcf1647dSMinchan Kim 7959a001fc1SVitaly Woolconfig Z3FOLD 7969a001fc1SVitaly Wool tristate "Up to 3x density storage for compressed pages" 7979a001fc1SVitaly Wool depends on ZPOOL 7989a001fc1SVitaly Wool help 7999a001fc1SVitaly Wool A special purpose allocator for storing compressed pages. 8009a001fc1SVitaly Wool It is designed to store up to three compressed pages per physical 8019a001fc1SVitaly Wool page. It is a ZBUD derivative so the simplicity and determinism are 8029a001fc1SVitaly Wool still there. 8039a001fc1SVitaly Wool 804bcf1647dSMinchan Kimconfig ZSMALLOC 805d867f203SMinchan Kim tristate "Memory allocator for compressed pages" 806bcf1647dSMinchan Kim depends on MMU 807bcf1647dSMinchan Kim help 808bcf1647dSMinchan Kim zsmalloc is a slab-based memory allocator designed to store 809bcf1647dSMinchan Kim compressed RAM pages. zsmalloc uses virtual memory mapping 810bcf1647dSMinchan Kim in order to reduce fragmentation. However, this results in a 811bcf1647dSMinchan Kim non-standard allocator interface where a handle, not a pointer, is 812bcf1647dSMinchan Kim returned by an alloc(). This handle must be mapped in order to 813bcf1647dSMinchan Kim access the allocated space. 814bcf1647dSMinchan Kim 8150f050d99SGanesh Mahendranconfig ZSMALLOC_STAT 8160f050d99SGanesh Mahendran bool "Export zsmalloc statistics" 8170f050d99SGanesh Mahendran depends on ZSMALLOC 8180f050d99SGanesh Mahendran select DEBUG_FS 8190f050d99SGanesh Mahendran help 8200f050d99SGanesh Mahendran This option enables code in the zsmalloc to collect various 82101ab1edeSColin Ian King statistics about what's happening in zsmalloc and exports that 8220f050d99SGanesh Mahendran information to userspace via debugfs. 8230f050d99SGanesh Mahendran If unsure, say N. 8240f050d99SGanesh Mahendran 8259e5c33d7SMark Salterconfig GENERIC_EARLY_IOREMAP 8269e5c33d7SMark Salter bool 827042d27acSHelge Deller 82822ee3ea5SHelge Dellerconfig STACK_MAX_DEFAULT_SIZE_MB 82922ee3ea5SHelge Deller int "Default maximum user stack size for 32-bit processes (MB)" 83022ee3ea5SHelge Deller default 100 831042d27acSHelge Deller range 8 2048 832042d27acSHelge Deller depends on STACK_GROWSUP && (!64BIT || COMPAT) 833042d27acSHelge Deller help 834042d27acSHelge Deller This is the maximum stack size in Megabytes in the VM layout of 32-bit 835042d27acSHelge Deller user processes when the stack grows upwards (currently only on parisc 83622ee3ea5SHelge Deller arch) when the RLIMIT_STACK hard limit is unlimited. 837042d27acSHelge Deller 83822ee3ea5SHelge Deller A sane initial value is 100 MB. 8393a80a7faSMel Gorman 8403a80a7faSMel Gormanconfig DEFERRED_STRUCT_PAGE_INIT 8411ce22103SVlastimil Babka bool "Defer initialisation of struct pages to kthreads" 842d39f8fb4SMike Rapoport depends on SPARSEMEM 843ab1e8d89SPavel Tatashin depends on !NEED_PER_CPU_KM 844889c695dSPasha Tatashin depends on 64BIT 845e4443149SDaniel Jordan select PADATA 8463a80a7faSMel Gorman help 8473a80a7faSMel Gorman Ordinarily all struct pages are initialised during early boot in a 8483a80a7faSMel Gorman single thread. On very large machines this can take a considerable 8493a80a7faSMel Gorman amount of time. If this option is set, large machines will bring up 850e4443149SDaniel Jordan a subset of memmap at boot and then initialise the rest in parallel. 851e4443149SDaniel Jordan This has a potential performance impact on tasks running early in the 8521ce22103SVlastimil Babka lifetime of the system until these kthreads finish the 8531ce22103SVlastimil Babka initialisation. 854033fbae9SDan Williams 8551c676e0dSSeongJae Parkconfig PAGE_IDLE_FLAG 8561c676e0dSSeongJae Park bool 8571c676e0dSSeongJae Park select PAGE_EXTENSION if !64BIT 8581c676e0dSSeongJae Park help 8591c676e0dSSeongJae Park This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed 8601c676e0dSSeongJae Park bit writers can set the state of the bit in the flags so that PTE 8611c676e0dSSeongJae Park Accessed bit readers may avoid disturbance. 8621c676e0dSSeongJae Park 86333c3fc71SVladimir Davydovconfig IDLE_PAGE_TRACKING 86433c3fc71SVladimir Davydov bool "Enable idle page tracking" 86533c3fc71SVladimir Davydov depends on SYSFS && MMU 8661c676e0dSSeongJae Park select PAGE_IDLE_FLAG 86733c3fc71SVladimir Davydov help 86833c3fc71SVladimir Davydov This feature allows to estimate the amount of user pages that have 86933c3fc71SVladimir Davydov not been touched during a given period of time. This information can 87033c3fc71SVladimir Davydov be useful to tune memory cgroup limits and/or for job placement 87133c3fc71SVladimir Davydov within a compute cluster. 87233c3fc71SVladimir Davydov 8731ad1335dSMike Rapoport See Documentation/admin-guide/mm/idle_page_tracking.rst for 8741ad1335dSMike Rapoport more details. 87533c3fc71SVladimir Davydov 876c2280be8SAnshuman Khandualconfig ARCH_HAS_CACHE_LINE_SIZE 877c2280be8SAnshuman Khandual bool 878c2280be8SAnshuman Khandual 8792792d84eSKees Cookconfig ARCH_HAS_CURRENT_STACK_POINTER 8802792d84eSKees Cook bool 8812792d84eSKees Cook help 8822792d84eSKees Cook In support of HARDENED_USERCOPY performing stack variable lifetime 8832792d84eSKees Cook checking, an architecture-agnostic way to find the stack pointer 8842792d84eSKees Cook is needed. Once an architecture defines an unsigned long global 8852792d84eSKees Cook register alias named "current_stack_pointer", this config can be 8862792d84eSKees Cook selected. 8872792d84eSKees Cook 88867436193SAnshuman Khandualconfig ARCH_HAS_VM_GET_PAGE_PROT 88967436193SAnshuman Khandual bool 89067436193SAnshuman Khandual 89117596731SRobin Murphyconfig ARCH_HAS_PTE_DEVMAP 89265f7d049SOliver O'Halloran bool 89365f7d049SOliver O'Halloran 89463703f37SKefeng Wangconfig ARCH_HAS_ZONE_DMA_SET 89563703f37SKefeng Wang bool 89663703f37SKefeng Wang 89763703f37SKefeng Wangconfig ZONE_DMA 89863703f37SKefeng Wang bool "Support DMA zone" if ARCH_HAS_ZONE_DMA_SET 89963703f37SKefeng Wang default y if ARM64 || X86 90063703f37SKefeng Wang 90163703f37SKefeng Wangconfig ZONE_DMA32 90263703f37SKefeng Wang bool "Support DMA32 zone" if ARCH_HAS_ZONE_DMA_SET 90363703f37SKefeng Wang depends on !X86_32 90463703f37SKefeng Wang default y if ARM64 90563703f37SKefeng Wang 906033fbae9SDan Williamsconfig ZONE_DEVICE 9075042db43SJérôme Glisse bool "Device memory (pmem, HMM, etc...) hotplug support" 908033fbae9SDan Williams depends on MEMORY_HOTPLUG 909033fbae9SDan Williams depends on MEMORY_HOTREMOVE 91099490f16SDan Williams depends on SPARSEMEM_VMEMMAP 91117596731SRobin Murphy depends on ARCH_HAS_PTE_DEVMAP 9123a08cd52SMatthew Wilcox select XARRAY_MULTI 913033fbae9SDan Williams 914033fbae9SDan Williams help 915033fbae9SDan Williams Device memory hotplug support allows for establishing pmem, 916033fbae9SDan Williams or other device driver discovered memory regions, in the 917033fbae9SDan Williams memmap. This allows pfn_to_page() lookups of otherwise 918033fbae9SDan Williams "device-physical" addresses which is needed for using a DAX 919033fbae9SDan Williams mapping in an O_DIRECT operation, among other things. 920033fbae9SDan Williams 921033fbae9SDan Williams If FS_DAX is enabled, then say Y. 92206a660adSLinus Torvalds 9239c240a7bSChristoph Hellwig# 9249c240a7bSChristoph Hellwig# Helpers to mirror range of the CPU page tables of a process into device page 9259c240a7bSChristoph Hellwig# tables. 9269c240a7bSChristoph Hellwig# 927c0b12405SJérôme Glisseconfig HMM_MIRROR 9289c240a7bSChristoph Hellwig bool 929f442c283SChristoph Hellwig depends on MMU 930c0b12405SJérôme Glisse 9315042db43SJérôme Glisseconfig DEVICE_PRIVATE 9325042db43SJérôme Glisse bool "Unaddressable device memory (GPU memory, ...)" 9337328d9ccSChristoph Hellwig depends on ZONE_DEVICE 9345042db43SJérôme Glisse 9355042db43SJérôme Glisse help 9365042db43SJérôme Glisse Allows creation of struct pages to represent unaddressable device 9375042db43SJérôme Glisse memory; i.e., memory that is only accessible from the device (or 9385042db43SJérôme Glisse group of devices). You likely also want to select HMM_MIRROR. 9395042db43SJérôme Glisse 9403e9a9e25SChristoph Hellwigconfig VMAP_PFN 9413e9a9e25SChristoph Hellwig bool 9423e9a9e25SChristoph Hellwig 94363c17fb8SDave Hansenconfig ARCH_USES_HIGH_VMA_FLAGS 94463c17fb8SDave Hansen bool 94566d37570SDave Hansenconfig ARCH_HAS_PKEYS 94666d37570SDave Hansen bool 94730a5b536SDennis Zhou 94830a5b536SDennis Zhouconfig PERCPU_STATS 94930a5b536SDennis Zhou bool "Collect percpu memory statistics" 95030a5b536SDennis Zhou help 95130a5b536SDennis Zhou This feature collects and exposes statistics via debugfs. The 95230a5b536SDennis Zhou information includes global and per chunk statistics, which can 95330a5b536SDennis Zhou be used to help understand percpu memory usage. 95464c349f4SKirill A. Shutemov 9559c84f229SJohn Hubbardconfig GUP_TEST 9569c84f229SJohn Hubbard bool "Enable infrastructure for get_user_pages()-related unit tests" 957d0de8241SBarry Song depends on DEBUG_FS 95864c349f4SKirill A. Shutemov help 9599c84f229SJohn Hubbard Provides /sys/kernel/debug/gup_test, which in turn provides a way 9609c84f229SJohn Hubbard to make ioctl calls that can launch kernel-based unit tests for 9619c84f229SJohn Hubbard the get_user_pages*() and pin_user_pages*() family of API calls. 96264c349f4SKirill A. Shutemov 9639c84f229SJohn Hubbard These tests include benchmark testing of the _fast variants of 9649c84f229SJohn Hubbard get_user_pages*() and pin_user_pages*(), as well as smoke tests of 9659c84f229SJohn Hubbard the non-_fast variants. 9669c84f229SJohn Hubbard 967f4f9bda4SJohn Hubbard There is also a sub-test that allows running dump_page() on any 968f4f9bda4SJohn Hubbard of up to eight pages (selected by command line args) within the 969f4f9bda4SJohn Hubbard range of user-space addresses. These pages are either pinned via 970f4f9bda4SJohn Hubbard pin_user_pages*(), or pinned via get_user_pages*(), as specified 971f4f9bda4SJohn Hubbard by other command line arguments. 972f4f9bda4SJohn Hubbard 9739c84f229SJohn Hubbard See tools/testing/selftests/vm/gup_test.c 9743010a5eaSLaurent Dufour 975d0de8241SBarry Songcomment "GUP_TEST needs to have DEBUG_FS enabled" 976d0de8241SBarry Song depends on !GUP_TEST && !DEBUG_FS 9773010a5eaSLaurent Dufour 97839656e83SChristoph Hellwigconfig GUP_GET_PTE_LOW_HIGH 97939656e83SChristoph Hellwig bool 98039656e83SChristoph Hellwig 98199cb0dbdSSong Liuconfig READ_ONLY_THP_FOR_FS 98299cb0dbdSSong Liu bool "Read-only THP for filesystems (EXPERIMENTAL)" 983396bcc52SMatthew Wilcox (Oracle) depends on TRANSPARENT_HUGEPAGE && SHMEM 98499cb0dbdSSong Liu 98599cb0dbdSSong Liu help 98699cb0dbdSSong Liu Allow khugepaged to put read-only file-backed pages in THP. 98799cb0dbdSSong Liu 98899cb0dbdSSong Liu This is marked experimental because it is a new feature. Write 98999cb0dbdSSong Liu support of file THPs will be developed in the next few release 99099cb0dbdSSong Liu cycles. 99199cb0dbdSSong Liu 9923010a5eaSLaurent Dufourconfig ARCH_HAS_PTE_SPECIAL 9933010a5eaSLaurent Dufour bool 99459e0b520SChristoph Hellwig 995cbd34da7SChristoph Hellwig# 996cbd34da7SChristoph Hellwig# Some architectures require a special hugepage directory format that is 997cbd34da7SChristoph Hellwig# required to support multiple hugepage sizes. For example a4fe3ce76 998cbd34da7SChristoph Hellwig# "powerpc/mm: Allow more flexible layouts for hugepage pagetables" 999cbd34da7SChristoph Hellwig# introduced it on powerpc. This allows for a more flexible hugepage 1000cbd34da7SChristoph Hellwig# pagetable layouts. 1001cbd34da7SChristoph Hellwig# 1002cbd34da7SChristoph Hellwigconfig ARCH_HAS_HUGEPD 1003cbd34da7SChristoph Hellwig bool 1004cbd34da7SChristoph Hellwig 1005c5acad84SThomas Hellstromconfig MAPPING_DIRTY_HELPERS 1006c5acad84SThomas Hellstrom bool 1007c5acad84SThomas Hellstrom 1008298fa1adSThomas Gleixnerconfig KMAP_LOCAL 1009298fa1adSThomas Gleixner bool 1010298fa1adSThomas Gleixner 1011825c43f5SArd Biesheuvelconfig KMAP_LOCAL_NON_LINEAR_PTE_ARRAY 1012825c43f5SArd Biesheuvel bool 1013825c43f5SArd Biesheuvel 10141fbaf8fcSChristoph Hellwig# struct io_mapping based helper. Selected by drivers that need them 10151fbaf8fcSChristoph Hellwigconfig IO_MAPPING 10161fbaf8fcSChristoph Hellwig bool 10171507f512SMike Rapoport 10181507f512SMike Rapoportconfig SECRETMEM 10191507f512SMike Rapoport def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED 10201507f512SMike Rapoport 10219a10064fSColin Crossconfig ANON_VMA_NAME 10229a10064fSColin Cross bool "Anonymous VMA name support" 10239a10064fSColin Cross depends on PROC_FS && ADVISE_SYSCALLS && MMU 10249a10064fSColin Cross 10259a10064fSColin Cross help 10269a10064fSColin Cross Allow naming anonymous virtual memory areas. 10279a10064fSColin Cross 10289a10064fSColin Cross This feature allows assigning names to virtual memory areas. Assigned 10299a10064fSColin Cross names can be later retrieved from /proc/pid/maps and /proc/pid/smaps 10309a10064fSColin Cross and help identifying individual anonymous memory areas. 10319a10064fSColin Cross Assigning a name to anonymous virtual memory area might prevent that 10329a10064fSColin Cross area from being merged with adjacent virtual memory areas due to the 10339a10064fSColin Cross difference in their name. 10349a10064fSColin Cross 1035430529b5SPeter Xuconfig USERFAULTFD 1036430529b5SPeter Xu bool "Enable userfaultfd() system call" 1037430529b5SPeter Xu depends on MMU 1038430529b5SPeter Xu help 1039430529b5SPeter Xu Enable the userfaultfd() system call that allows to intercept and 1040430529b5SPeter Xu handle page faults in userland. 1041430529b5SPeter Xu 1042430529b5SPeter Xuconfig HAVE_ARCH_USERFAULTFD_WP 1043430529b5SPeter Xu bool 1044430529b5SPeter Xu help 1045430529b5SPeter Xu Arch has userfaultfd write protection support 1046430529b5SPeter Xu 1047430529b5SPeter Xuconfig HAVE_ARCH_USERFAULTFD_MINOR 1048430529b5SPeter Xu bool 1049430529b5SPeter Xu help 1050430529b5SPeter Xu Arch has userfaultfd minor fault support 1051430529b5SPeter Xu 1052679d1033SPeter Xuconfig PTE_MARKER 105381e0f15fSPeter Xu bool 1054679d1033SPeter Xu 1055679d1033SPeter Xu help 1056679d1033SPeter Xu Allows to create marker PTEs for file-backed memory. 1057679d1033SPeter Xu 10581db9dbc2SPeter Xuconfig PTE_MARKER_UFFD_WP 105981e0f15fSPeter Xu bool "Userfaultfd write protection support for shmem/hugetlbfs" 106081e0f15fSPeter Xu default y 106181e0f15fSPeter Xu depends on HAVE_ARCH_USERFAULTFD_WP 106281e0f15fSPeter Xu select PTE_MARKER 10631db9dbc2SPeter Xu 10641db9dbc2SPeter Xu help 10651db9dbc2SPeter Xu Allows to create marker PTEs for userfaultfd write protection 10661db9dbc2SPeter Xu purposes. It is required to enable userfaultfd write protection on 10671db9dbc2SPeter Xu file-backed memory types like shmem and hugetlbfs. 10681db9dbc2SPeter Xu 10692224d848SSeongJae Parksource "mm/damon/Kconfig" 10702224d848SSeongJae Park 107159e0b520SChristoph Hellwigendmenu 1072