]> Git Repo - linux.git/blame - mm/Kconfig
mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED
[linux.git] / mm / Kconfig
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
59e0b520
CH
2
3menu "Memory Management options"
4
7b42f104
JW
5#
6# For some reason microblaze and nios2 hard code SWAP=n. Hopefully we can
7# add proper SWAP support to them, in which case this can be remove.
8#
9config ARCH_NO_SWAP
10 bool
11
b3fbd58f
JW
12config ZPOOL
13 bool
14
519bcb79 15menuconfig SWAP
7b42f104
JW
16 bool "Support for paging of anonymous memory (swap)"
17 depends on MMU && BLOCK && !ARCH_NO_SWAP
18 default y
19 help
20 This option allows you to choose whether you want to have support
21 for so called swap devices or swap files in your kernel that are
22 used to provide more virtual memory than the actual RAM present
23 in your computer. If unsure say Y.
24
519bcb79 25config ZSWAP
fcab9b44 26 bool "Compressed cache for swap pages"
b3fbd58f 27 depends on SWAP
519bcb79 28 select FRONTSWAP
b3fbd58f 29 select CRYPTO
519bcb79
JW
30 select ZPOOL
31 help
32 A lightweight compressed cache for swap pages. It takes
33 pages that are in the process of being swapped out and attempts to
34 compress them into a dynamically allocated RAM-based memory pool.
35 This can result in a significant I/O reduction on swap device and,
1a44131d 36 in the case where decompressing from RAM is faster than swap device
519bcb79
JW
37 reads, can also improve workload performance.
38
b3fbd58f
JW
39config ZSWAP_DEFAULT_ON
40 bool "Enable the compressed cache for swap pages by default"
41 depends on ZSWAP
42 help
43 If selected, the compressed cache for swap pages will be enabled
44 at boot, otherwise it will be disabled.
45
46 The selection made here can be overridden by using the kernel
47 command line 'zswap.enabled=' option.
48
519bcb79 49choice
b3fbd58f 50 prompt "Default compressor"
519bcb79
JW
51 depends on ZSWAP
52 default ZSWAP_COMPRESSOR_DEFAULT_LZO
53 help
54 Selects the default compression algorithm for the compressed cache
55 for swap pages.
56
57 For an overview what kind of performance can be expected from
58 a particular compression algorithm please refer to the benchmarks
59 available at the following LWN page:
60 https://lwn.net/Articles/751795/
61
62 If in doubt, select 'LZO'.
63
64 The selection made here can be overridden by using the kernel
65 command line 'zswap.compressor=' option.
66
67config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
68 bool "Deflate"
69 select CRYPTO_DEFLATE
70 help
71 Use the Deflate algorithm as the default compression algorithm.
72
73config ZSWAP_COMPRESSOR_DEFAULT_LZO
74 bool "LZO"
75 select CRYPTO_LZO
76 help
77 Use the LZO algorithm as the default compression algorithm.
78
79config ZSWAP_COMPRESSOR_DEFAULT_842
80 bool "842"
81 select CRYPTO_842
82 help
83 Use the 842 algorithm as the default compression algorithm.
84
85config ZSWAP_COMPRESSOR_DEFAULT_LZ4
86 bool "LZ4"
87 select CRYPTO_LZ4
88 help
89 Use the LZ4 algorithm as the default compression algorithm.
90
91config ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
92 bool "LZ4HC"
93 select CRYPTO_LZ4HC
94 help
95 Use the LZ4HC algorithm as the default compression algorithm.
96
97config ZSWAP_COMPRESSOR_DEFAULT_ZSTD
98 bool "zstd"
99 select CRYPTO_ZSTD
100 help
101 Use the zstd algorithm as the default compression algorithm.
102endchoice
103
104config ZSWAP_COMPRESSOR_DEFAULT
105 string
106 depends on ZSWAP
107 default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
108 default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
109 default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
110 default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
111 default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
112 default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
113 default ""
114
115choice
b3fbd58f 116 prompt "Default allocator"
519bcb79
JW
117 depends on ZSWAP
118 default ZSWAP_ZPOOL_DEFAULT_ZBUD
119 help
120 Selects the default allocator for the compressed cache for
121 swap pages.
122 The default is 'zbud' for compatibility, however please do
123 read the description of each of the allocators below before
124 making a right choice.
125
126 The selection made here can be overridden by using the kernel
127 command line 'zswap.zpool=' option.
128
129config ZSWAP_ZPOOL_DEFAULT_ZBUD
130 bool "zbud"
131 select ZBUD
132 help
133 Use the zbud allocator as the default allocator.
134
135config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
136 bool "z3fold"
137 select Z3FOLD
138 help
139 Use the z3fold allocator as the default allocator.
140
141config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
142 bool "zsmalloc"
143 select ZSMALLOC
144 help
145 Use the zsmalloc allocator as the default allocator.
146endchoice
147
148config ZSWAP_ZPOOL_DEFAULT
149 string
150 depends on ZSWAP
151 default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
152 default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
153 default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
154 default ""
155
519bcb79 156config ZBUD
b3fbd58f
JW
157 tristate "2:1 compression allocator (zbud)"
158 depends on ZSWAP
519bcb79
JW
159 help
160 A special purpose allocator for storing compressed pages.
161 It is designed to store up to two compressed pages per physical
162 page. While this design limits storage density, it has simple and
163 deterministic reclaim properties that make it preferable to a higher
164 density approach when reclaim will be used.
165
166config Z3FOLD
b3fbd58f
JW
167 tristate "3:1 compression allocator (z3fold)"
168 depends on ZSWAP
519bcb79
JW
169 help
170 A special purpose allocator for storing compressed pages.
171 It is designed to store up to three compressed pages per physical
172 page. It is a ZBUD derivative so the simplicity and determinism are
173 still there.
174
175config ZSMALLOC
b3fbd58f
JW
176 tristate
177 prompt "N:1 compression allocator (zsmalloc)" if ZSWAP
519bcb79
JW
178 depends on MMU
179 help
180 zsmalloc is a slab-based memory allocator designed to store
b3fbd58f
JW
181 pages of various compression levels efficiently. It achieves
182 the highest storage density with the least amount of fragmentation.
519bcb79
JW
183
184config ZSMALLOC_STAT
185 bool "Export zsmalloc statistics"
186 depends on ZSMALLOC
187 select DEBUG_FS
188 help
189 This option enables code in the zsmalloc to collect various
190 statistics about what's happening in zsmalloc and exports that
191 information to userspace via debugfs.
192 If unsure, say N.
193
4ff93b29
SS
194config ZSMALLOC_CHAIN_SIZE
195 int "Maximum number of physical pages per-zspage"
b46402fa 196 default 8
4ff93b29
SS
197 range 4 16
198 depends on ZSMALLOC
199 help
200 This option sets the upper limit on the number of physical pages
201 that a zmalloc page (zspage) can consist of. The optimal zspage
202 chain size is calculated for each size class during the
203 initialization of the pool.
204
205 Changing this option can alter the characteristics of size classes,
206 such as the number of pages per zspage and the number of objects
207 per zspage. This can also result in different configurations of
208 the pool, as zsmalloc merges size classes with similar
209 characteristics.
210
211 For more information, see zsmalloc documentation.
212
519bcb79
JW
213menu "SLAB allocator options"
214
7b42f104
JW
215choice
216 prompt "Choose SLAB allocator"
217 default SLUB
218 help
219 This option allows to select a slab allocator.
220
eb07c4f3
VB
221config SLAB_DEPRECATED
222 bool "SLAB (DEPRECATED)"
7b42f104
JW
223 depends on !PREEMPT_RT
224 select HAVE_HARDENED_USERCOPY_ALLOCATOR
225 help
eb07c4f3
VB
226 Deprecated and scheduled for removal in a few cycles. Replaced by
227 SLUB.
228
229 If you cannot migrate to SLUB, please contact [email protected]
230 and the people listed in the SLAB ALLOCATOR section of MAINTAINERS
231 file, explaining why.
232
7b42f104
JW
233 The regular slab allocator that is established and known to work
234 well in all environments. It organizes cache hot objects in
235 per cpu and per node queues.
236
237config SLUB
238 bool "SLUB (Unqueued Allocator)"
239 select HAVE_HARDENED_USERCOPY_ALLOCATOR
240 help
241 SLUB is a slab allocator that minimizes cache line usage
242 instead of managing queues of cached objects (SLAB approach).
243 Per cpu caching is realized using slabs of objects instead
244 of queues of objects. SLUB can use memory efficiently
245 and has enhanced diagnostics. SLUB is the default choice for
246 a slab allocator.
247
7b42f104
JW
248endchoice
249
eb07c4f3
VB
250config SLAB
251 bool
252 default y
253 depends on SLAB_DEPRECATED
254
e240e53a
VB
255config SLUB_TINY
256 bool "Configure SLUB for minimal memory footprint"
257 depends on SLUB && EXPERT
258 select SLAB_MERGE_DEFAULT
259 help
260 Configures the SLUB allocator in a way to achieve minimal memory
261 footprint, sacrificing scalability, debugging and other features.
262 This is intended only for the smallest system that had used the
263 SLOB allocator and is not recommended for systems with more than
264 16MB RAM.
265
266 If unsure, say N.
267
7b42f104
JW
268config SLAB_MERGE_DEFAULT
269 bool "Allow slab caches to be merged"
270 default y
271 depends on SLAB || SLUB
272 help
273 For reduced kernel memory fragmentation, slab caches can be
274 merged when they share the same size and other characteristics.
275 This carries a risk of kernel heap overflows being able to
276 overwrite objects from merged caches (and more easily control
277 cache layout), which makes such heap attacks easier to exploit
278 by attackers. By keeping caches unmerged, these kinds of exploits
279 can usually only damage objects in the same cache. To disable
280 merging at runtime, "slab_nomerge" can be passed on the kernel
281 command line.
282
283config SLAB_FREELIST_RANDOM
284 bool "Randomize slab freelist"
e240e53a 285 depends on SLAB || (SLUB && !SLUB_TINY)
7b42f104
JW
286 help
287 Randomizes the freelist order used on creating new pages. This
288 security feature reduces the predictability of the kernel slab
289 allocator against heap overflows.
290
291config SLAB_FREELIST_HARDENED
292 bool "Harden slab freelist metadata"
e240e53a 293 depends on SLAB || (SLUB && !SLUB_TINY)
7b42f104
JW
294 help
295 Many kernel heap attacks try to target slab cache metadata and
296 other infrastructure. This options makes minor performance
297 sacrifices to harden the kernel slab allocator against common
298 freelist exploit methods. Some slab implementations have more
299 sanity-checking than others. This option is most effective with
300 CONFIG_SLUB.
301
0710d012
VB
302config SLUB_STATS
303 default n
304 bool "Enable SLUB performance statistics"
e240e53a 305 depends on SLUB && SYSFS && !SLUB_TINY
0710d012
VB
306 help
307 SLUB statistics are useful to debug SLUBs allocation behavior in
308 order find ways to optimize the allocator. This should never be
309 enabled for production use since keeping statistics slows down
310 the allocator by a few percentage points. The slabinfo command
311 supports the determination of the most active slabs to figure
312 out which slabs are relevant to a particular load.
313 Try running: slabinfo -DA
314
519bcb79
JW
315config SLUB_CPU_PARTIAL
316 default y
e240e53a 317 depends on SLUB && SMP && !SLUB_TINY
519bcb79
JW
318 bool "SLUB per cpu partial cache"
319 help
320 Per cpu partial caches accelerate objects allocation and freeing
321 that is local to a processor at the price of more indeterminism
322 in the latency of the free. On overflow these caches will be cleared
323 which requires the taking of locks that may cause latency spikes.
324 Typically one would choose no for a realtime system.
325
326endmenu # SLAB allocator options
327
7b42f104
JW
328config SHUFFLE_PAGE_ALLOCATOR
329 bool "Page allocator randomization"
330 default SLAB_FREELIST_RANDOM && ACPI_NUMA
331 help
332 Randomization of the page allocator improves the average
333 utilization of a direct-mapped memory-side-cache. See section
334 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
335 6.2a specification for an example of how a platform advertises
336 the presence of a memory-side-cache. There are also incidental
337 security benefits as it reduces the predictability of page
338 allocations to compliment SLAB_FREELIST_RANDOM, but the
23baf831
KS
339 default granularity of shuffling on the MAX_ORDER i.e, 10th
340 order of pages is selected based on cache utilization benefits
341 on x86.
7b42f104
JW
342
343 While the randomization improves cache utilization it may
344 negatively impact workloads on platforms without a cache. For
345 this reason, by default, the randomization is enabled only
346 after runtime detection of a direct-mapped memory-side-cache.
347 Otherwise, the randomization may be force enabled with the
348 'page_alloc.shuffle' kernel command line parameter.
349
350 Say Y if unsure.
351
0710d012
VB
352config COMPAT_BRK
353 bool "Disable heap randomization"
354 default y
355 help
356 Randomizing heap placement makes heap exploits harder, but it
357 also breaks ancient binaries (including anything libc5 based).
358 This option changes the bootup default to heap randomization
359 disabled, and can be overridden at runtime by setting
360 /proc/sys/kernel/randomize_va_space to 2.
361
362 On non-ancient distros (post-2000 ones) N is usually a safe choice.
363
364config MMAP_ALLOW_UNINITIALIZED
365 bool "Allow mmapped anonymous memory to be uninitialized"
366 depends on EXPERT && !MMU
367 default n
368 help
369 Normally, and according to the Linux spec, anonymous memory obtained
370 from mmap() has its contents cleared before it is passed to
371 userspace. Enabling this config option allows you to request that
372 mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
373 providing a huge performance boost. If this option is not enabled,
374 then the flag will be ignored.
375
376 This is taken advantage of by uClibc's malloc(), and also by
377 ELF-FDPIC binfmt's brk and stack allocator.
378
379 Because of the obvious security issues, this option should only be
380 enabled on embedded devices where you control what is run in
381 userspace. Since that isn't generally a problem on no-MMU systems,
382 it is normally safe to say Y here.
383
384 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
385
e1785e85
DH
386config SELECT_MEMORY_MODEL
387 def_bool y
a8826eeb 388 depends on ARCH_SELECT_MEMORY_MODEL
e1785e85 389
3a9da765
DH
390choice
391 prompt "Memory model"
e1785e85 392 depends on SELECT_MEMORY_MODEL
d41dee36 393 default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT
e1785e85 394 default FLATMEM_MANUAL
d66d109d
MR
395 help
396 This option allows you to change some of the ways that
397 Linux manages its memory internally. Most users will
398 only have one option here selected by the architecture
399 configuration. This is normal.
3a9da765 400
e1785e85 401config FLATMEM_MANUAL
3a9da765 402 bool "Flat Memory"
bb1c50d3 403 depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE
3a9da765 404 help
d66d109d
MR
405 This option is best suited for non-NUMA systems with
406 flat address space. The FLATMEM is the most efficient
407 system in terms of performance and resource consumption
408 and it is the best option for smaller systems.
409
410 For systems that have holes in their physical address
411 spaces and for features like NUMA and memory hotplug,
dd33d29a 412 choose "Sparse Memory".
d41dee36
AW
413
414 If unsure, choose this option (Flat Memory) over any other.
3a9da765 415
d41dee36
AW
416config SPARSEMEM_MANUAL
417 bool "Sparse Memory"
418 depends on ARCH_SPARSEMEM_ENABLE
419 help
420 This will be the only option for some systems, including
d66d109d 421 memory hot-plug systems. This is normal.
d41dee36 422
d66d109d
MR
423 This option provides efficient support for systems with
424 holes is their physical address space and allows memory
425 hot-plug and hot-remove.
d41dee36 426
d66d109d 427 If unsure, choose "Flat Memory" over this option.
d41dee36 428
3a9da765
DH
429endchoice
430
d41dee36
AW
431config SPARSEMEM
432 def_bool y
1a83e175 433 depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL
d41dee36 434
e1785e85
DH
435config FLATMEM
436 def_bool y
bb1c50d3 437 depends on !SPARSEMEM || FLATMEM_MANUAL
d41dee36 438
3e347261
BP
439#
440# SPARSEMEM_EXTREME (which is the default) does some bootmem
c89ab04f 441# allocations when sparse_init() is called. If this cannot
3e347261
BP
442# be done on your architecture, select this option. However,
443# statically allocating the mem_section[] array can potentially
444# consume vast quantities of .bss, so be careful.
445#
446# This option will also potentially produce smaller runtime code
447# with gcc 3.4 and later.
448#
449config SPARSEMEM_STATIC
9ba16087 450 bool
3e347261 451
802f192e 452#
44c09201 453# Architecture platforms which require a two level mem_section in SPARSEMEM
802f192e
BP
454# must select this option. This is usually for architecture platforms with
455# an extremely sparse physical address space.
456#
3e347261
BP
457config SPARSEMEM_EXTREME
458 def_bool y
459 depends on SPARSEMEM && !SPARSEMEM_STATIC
4c21e2f2 460
29c71111 461config SPARSEMEM_VMEMMAP_ENABLE
9ba16087 462 bool
29c71111
AW
463
464config SPARSEMEM_VMEMMAP
a5ee6daa
GL
465 bool "Sparse Memory virtual memmap"
466 depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE
467 default y
468 help
19fa40a0
KK
469 SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
470 pfn_to_page and page_to_pfn operations. This is the most
471 efficient option when sufficient kernel resources are available.
0b376f1e
AK
472#
473# Select this config option from the architecture Kconfig, if it is preferred
474# to enable the feature of HugeTLB/dev_dax vmemmap optimization.
475#
476config ARCH_WANT_OPTIMIZE_VMEMMAP
477 bool
29c71111 478
70210ed9 479config HAVE_MEMBLOCK_PHYS_MAP
6341e62b 480 bool
70210ed9 481
67a929e0 482config HAVE_FAST_GUP
050a9adc 483 depends on MMU
6341e62b 484 bool
2667f50e 485
52219aea
DH
486# Don't discard allocated memory used to track "memory" and "reserved" memblocks
487# after early boot, so it can still be used to test for validity of memory.
488# Also, memblocks are updated with memory hot(un)plug.
350e88ba 489config ARCH_KEEP_MEMBLOCK
6341e62b 490 bool
c378ddd5 491
1e5d8e1e
DW
492# Keep arch NUMA mapping infrastructure post-init.
493config NUMA_KEEP_MEMINFO
494 bool
495
ee6f509c 496config MEMORY_ISOLATION
6341e62b 497 bool
ee6f509c 498
a9e7b8d4
DH
499# IORESOURCE_SYSTEM_RAM regions in the kernel resource tree that are marked
500# IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via
501# /dev/mem.
502config EXCLUSIVE_SYSTEM_RAM
503 def_bool y
504 depends on !DEVMEM || STRICT_DEVMEM
505
46723bfa
YI
506#
507# Only be set on architectures that have completely implemented memory hotplug
508# feature. If you are not sure, don't touch it.
509#
510config HAVE_BOOTMEM_INFO_NODE
511 def_bool n
512
91024b3c
AK
513config ARCH_ENABLE_MEMORY_HOTPLUG
514 bool
515
519bcb79
JW
516config ARCH_ENABLE_MEMORY_HOTREMOVE
517 bool
518
3947be19 519# eventually, we can have this option just 'select SPARSEMEM'
519bcb79
JW
520menuconfig MEMORY_HOTPLUG
521 bool "Memory hotplug"
b30c5927 522 select MEMORY_ISOLATION
71b6f2dd 523 depends on SPARSEMEM
40b31360 524 depends on ARCH_ENABLE_MEMORY_HOTPLUG
7ec58a2b 525 depends on 64BIT
1e5d8e1e 526 select NUMA_KEEP_MEMINFO if NUMA
3947be19 527
519bcb79
JW
528if MEMORY_HOTPLUG
529
8604d9e5 530config MEMORY_HOTPLUG_DEFAULT_ONLINE
19fa40a0
KK
531 bool "Online the newly added memory blocks by default"
532 depends on MEMORY_HOTPLUG
533 help
8604d9e5
VK
534 This option sets the default policy setting for memory hotplug
535 onlining policy (/sys/devices/system/memory/auto_online_blocks) which
536 determines what happens to newly added memory regions. Policy setting
537 can always be changed at runtime.
cb1aaebe 538 See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
8604d9e5
VK
539
540 Say Y here if you want all hot-plugged memory blocks to appear in
541 'online' state by default.
542 Say N here if you want the default policy to keep all hot-plugged
543 memory blocks in 'offline' state.
544
0c0e6195
KH
545config MEMORY_HOTREMOVE
546 bool "Allow for memory hot remove"
f7e3334a 547 select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
0c0e6195
KH
548 depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
549 depends on MIGRATION
550
a08a2ae3
OS
551config MHP_MEMMAP_ON_MEMORY
552 def_bool y
553 depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP
554 depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
555
519bcb79
JW
556endif # MEMORY_HOTPLUG
557
4c21e2f2
HD
558# Heavily threaded applications may benefit from splitting the mm-wide
559# page_table_lock, so that faults on different parts of the user address
560# space can be handled with less contention: split it at this NR_CPUS.
561# Default to 4 for wider testing, though 8 might be more appropriate.
562# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
7b6ac9df 563# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
60bccaa6
WD
564# SPARC32 allocates multiple pte tables within a single page, and therefore
565# a per-page lock leads to problems when multiple tables need to be locked
566# at the same time (e.g. copy_page_range()).
a70caa8b 567# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page.
4c21e2f2
HD
568#
569config SPLIT_PTLOCK_CPUS
570 int
9164550e 571 default "999999" if !MMU
a70caa8b
HD
572 default "999999" if ARM && !CPU_CACHE_VIPT
573 default "999999" if PARISC && !PA20
60bccaa6 574 default "999999" if SPARC32
4c21e2f2 575 default "4"
7cbe34cf 576
e009bb30 577config ARCH_ENABLE_SPLIT_PMD_PTLOCK
6341e62b 578 bool
e009bb30 579
09316c09
KK
580#
581# support for memory balloon
582config MEMORY_BALLOON
6341e62b 583 bool
09316c09 584
18468d93
RA
585#
586# support for memory balloon compaction
587config BALLOON_COMPACTION
588 bool "Allow for balloon memory compaction/migration"
589 def_bool y
09316c09 590 depends on COMPACTION && MEMORY_BALLOON
18468d93
RA
591 help
592 Memory fragmentation introduced by ballooning might reduce
593 significantly the number of 2MB contiguous memory blocks that can be
594 used within a guest, thus imposing performance penalties associated
595 with the reduced number of transparent huge pages that could be used
596 by the guest workload. Allowing the compaction & migration for memory
597 pages enlisted as being part of memory balloon devices avoids the
598 scenario aforementioned and helps improving memory defragmentation.
599
e9e96b39
MG
600#
601# support for memory compaction
602config COMPACTION
603 bool "Allow for memory compaction"
05106e6a 604 def_bool y
e9e96b39 605 select MIGRATION
33a93877 606 depends on MMU
e9e96b39 607 help
19fa40a0
KK
608 Compaction is the only memory management component to form
609 high order (larger physically contiguous) memory blocks
610 reliably. The page allocator relies on compaction heavily and
611 the lack of the feature can lead to unexpected OOM killer
612 invocations for high order memory requests. You shouldn't
613 disable this option unless there really is a strong reason for
614 it and then we would be really interested to hear about that at
615 [email protected].
e9e96b39 616
c7e0b3d0
TG
617config COMPACT_UNEVICTABLE_DEFAULT
618 int
619 depends on COMPACTION
620 default 0 if PREEMPT_RT
621 default 1
622
36e66c55
AD
623#
624# support for free page reporting
625config PAGE_REPORTING
626 bool "Free page reporting"
627 def_bool n
628 help
629 Free page reporting allows for the incremental acquisition of
630 free pages from the buddy allocator for the purpose of reporting
631 those pages to another entity, such as a hypervisor, so that the
632 memory can be freed within the host for other uses.
633
7cbe34cf
CL
634#
635# support for page migration
636#
637config MIGRATION
b20a3503 638 bool "Page migration"
6c5240ae 639 def_bool y
de32a817 640 depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
b20a3503
CL
641 help
642 Allows the migration of the physical location of pages of processes
e9e96b39
MG
643 while the virtual addresses are not changed. This is useful in
644 two situations. The first is on NUMA systems to put pages nearer
645 to the processors accessing. The second is when allocating huge
646 pages as migration can relocate pages to satisfy a huge page
647 allocation instead of reclaiming.
6550e07f 648
76cbbead 649config DEVICE_MIGRATION
d90a25f8 650 def_bool MIGRATION && ZONE_DEVICE
76cbbead 651
c177c81e 652config ARCH_ENABLE_HUGEPAGE_MIGRATION
6341e62b 653 bool
c177c81e 654
9c670ea3
NH
655config ARCH_ENABLE_THP_MIGRATION
656 bool
657
4bfb68a0
AK
658config HUGETLB_PAGE_SIZE_VARIABLE
659 def_bool n
660 help
661 Allows the pageblock_order value to be dynamic instead of just standard
662 HUGETLB_PAGE_ORDER when there are multiple HugeTLB page sizes available
663 on a platform.
664
23baf831
KS
665 Note that the pageblock_order cannot exceed MAX_ORDER and will be
666 clamped down to MAX_ORDER.
b3d40a2b 667
8df995f6 668config CONTIG_ALLOC
19fa40a0 669 def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
8df995f6 670
600715dc 671config PHYS_ADDR_T_64BIT
d4a451d5 672 def_bool 64BIT
600715dc 673
2a7326b5 674config BOUNCE
9ca24e2e
VM
675 bool "Enable bounce buffers"
676 default y
ce288e05 677 depends on BLOCK && MMU && HIGHMEM
9ca24e2e 678 help
ce288e05
CH
679 Enable bounce buffers for devices that cannot access the full range of
680 memory available to the CPU. Enabled by default when HIGHMEM is
681 selected, but you may say n to override this.
2a7326b5 682
cddb8a5c
AA
683config MMU_NOTIFIER
684 bool
99cb252f 685 select INTERVAL_TREE
fc4d5c29 686
f8af4da3
HD
687config KSM
688 bool "Enable KSM for page merging"
689 depends on MMU
59e1a2f4 690 select XXHASH
f8af4da3
HD
691 help
692 Enable Kernel Samepage Merging: KSM periodically scans those areas
693 of an application's address space that an app has advised may be
694 mergeable. When it finds pages of identical content, it replaces
d0f209f6 695 the many instances by a single page with that content, so
f8af4da3
HD
696 saving memory until one or another app needs to modify the content.
697 Recommended for use with KVM, or with other duplicative applications.
ee65728e 698 See Documentation/mm/ksm.rst for more information: KSM is inactive
c73602ad
HD
699 until a program has madvised that an area is MADV_MERGEABLE, and
700 root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
f8af4da3 701
e0a94c2a 702config DEFAULT_MMAP_MIN_ADDR
19fa40a0 703 int "Low address space to protect from user allocation"
6e141546 704 depends on MMU
19fa40a0
KK
705 default 4096
706 help
e0a94c2a
CL
707 This is the portion of low virtual memory which should be protected
708 from userspace allocation. Keeping a user from writing to low pages
709 can help reduce the impact of kernel NULL pointer bugs.
710
711 For most ia64, ppc64 and x86 users with lots of address space
712 a value of 65536 is reasonable and should cause no problems.
713 On arm and other archs it should not be higher than 32768.
788084ab
EP
714 Programs which use vm86 functionality or have some need to map
715 this low address space will need CAP_SYS_RAWIO or disable this
716 protection by setting the value to 0.
e0a94c2a
CL
717
718 This value can be changed after boot using the
719 /proc/sys/vm/mmap_min_addr tunable.
720
d949f36f
LT
721config ARCH_SUPPORTS_MEMORY_FAILURE
722 bool
e0a94c2a 723
6a46079c
AK
724config MEMORY_FAILURE
725 depends on MMU
d949f36f 726 depends on ARCH_SUPPORTS_MEMORY_FAILURE
6a46079c 727 bool "Enable recovery from hardware memory errors"
ee6f509c 728 select MEMORY_ISOLATION
97f0b134 729 select RAS
6a46079c
AK
730 help
731 Enables code to recover from some memory failures on systems
732 with MCA recovery. This allows a system to continue running
733 even when some of its memory has uncorrected errors. This requires
734 special hardware support and typically ECC memory.
735
cae681fc 736config HWPOISON_INJECT
413f9efb 737 tristate "HWPoison pages injector"
27df5068 738 depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
478c5ffc 739 select PROC_PAGE_MONITOR
cae681fc 740
fc4d5c29
DH
741config NOMMU_INITIAL_TRIM_EXCESS
742 int "Turn on mmap() excess space trimming before booting"
743 depends on !MMU
744 default 1
745 help
746 The NOMMU mmap() frequently needs to allocate large contiguous chunks
747 of memory on which to store mappings, but it can only ask the system
748 allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
749 more than it requires. To deal with this, mmap() is able to trim off
750 the excess and return it to the allocator.
751
752 If trimming is enabled, the excess is trimmed off and returned to the
753 system allocator, which can cause extra fragmentation, particularly
754 if there are a lot of transient processes.
755
756 If trimming is disabled, the excess is kept, but not used, which for
757 long-term mappings means that the space is wasted.
758
759 Trimming can be dynamically controlled through a sysctl option
760 (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of
761 excess pages there must be before trimming should occur, or zero if
762 no trimming is to occur.
763
764 This option specifies the initial value of this option. The default
765 of 1 says that all excess pages should be trimmed.
766
dd19d293 767 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
bbddff05 768
519bcb79
JW
769config ARCH_WANT_GENERAL_HUGETLB
770 bool
771
772config ARCH_WANTS_THP_SWAP
773 def_bool n
774
775menuconfig TRANSPARENT_HUGEPAGE
13ece886 776 bool "Transparent Hugepage Support"
554b0f3c 777 depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE && !PREEMPT_RT
5d689240 778 select COMPACTION
3a08cd52 779 select XARRAY_MULTI
4c76d9d1
AA
780 help
781 Transparent Hugepages allows the kernel to use huge pages and
782 huge tlb transparently to the applications whenever possible.
783 This feature can improve computing performance to certain
784 applications by speeding up page faults during memory
785 allocation, by reducing the number of tlb misses and by speeding
786 up the pagetable walking.
787
788 If memory constrained on embedded, you may want to say N.
789
519bcb79
JW
790if TRANSPARENT_HUGEPAGE
791
13ece886
AA
792choice
793 prompt "Transparent Hugepage Support sysfs defaults"
794 depends on TRANSPARENT_HUGEPAGE
795 default TRANSPARENT_HUGEPAGE_ALWAYS
796 help
797 Selects the sysfs defaults for Transparent Hugepage Support.
798
799 config TRANSPARENT_HUGEPAGE_ALWAYS
800 bool "always"
801 help
802 Enabling Transparent Hugepage always, can increase the
803 memory footprint of applications without a guaranteed
804 benefit but it will work automatically for all applications.
805
806 config TRANSPARENT_HUGEPAGE_MADVISE
807 bool "madvise"
808 help
809 Enabling Transparent Hugepage madvise, will only provide a
810 performance improvement benefit to the applications using
811 madvise(MADV_HUGEPAGE) but it won't risk to increase the
812 memory footprint of applications without a guaranteed
813 benefit.
814endchoice
815
38d8b4e6
YH
816config THP_SWAP
817 def_bool y
dad6a5eb 818 depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP && 64BIT
38d8b4e6
YH
819 help
820 Swap transparent huge pages in one piece, without splitting.
14fef284
YH
821 XXX: For now, swap cluster backing transparent huge page
822 will be split after swapout.
38d8b4e6
YH
823
824 For selection by architectures with reasonable THP sizes.
825
519bcb79
JW
826config READ_ONLY_THP_FOR_FS
827 bool "Read-only THP for filesystems (EXPERIMENTAL)"
828 depends on TRANSPARENT_HUGEPAGE && SHMEM
829
830 help
831 Allow khugepaged to put read-only file-backed pages in THP.
832
833 This is marked experimental because it is a new feature. Write
834 support of file THPs will be developed in the next few release
835 cycles.
836
837endif # TRANSPARENT_HUGEPAGE
838
bbddff05
TH
839#
840# UP and nommu archs use km based percpu allocator
841#
842config NEED_PER_CPU_KM
3583521a 843 depends on !SMP || !MMU
bbddff05
TH
844 bool
845 default y
077b1f83 846
7ecd19cf
KW
847config NEED_PER_CPU_EMBED_FIRST_CHUNK
848 bool
849
850config NEED_PER_CPU_PAGE_FIRST_CHUNK
851 bool
852
853config USE_PERCPU_NUMA_NODE_ID
854 bool
855
856config HAVE_SETUP_PER_CPU_AREA
857 bool
858
27c6aec2 859config FRONTSWAP
6e61dde8 860 bool
f825c736
AK
861
862config CMA
863 bool "Contiguous Memory Allocator"
aca52c39 864 depends on MMU
f825c736
AK
865 select MIGRATION
866 select MEMORY_ISOLATION
867 help
868 This enables the Contiguous Memory Allocator which allows other
869 subsystems to allocate big physically-contiguous blocks of memory.
870 CMA reserves a region of memory and allows only movable pages to
871 be allocated from it. This way, the kernel can use the memory for
872 pagecache and when a subsystem requests for contiguous area, the
873 allocated pages are migrated away to serve the contiguous request.
874
875 If unsure, say "n".
876
877config CMA_DEBUG
878 bool "CMA debug messages (DEVELOPMENT)"
879 depends on DEBUG_KERNEL && CMA
880 help
881 Turns on debug messages in CMA. This produces KERN_DEBUG
882 messages for every CMA call as well as various messages while
883 processing calls such as dma_alloc_from_contiguous().
884 This option does not affect warning and error messages.
bf550fc9 885
28b24c1f
SL
886config CMA_DEBUGFS
887 bool "CMA debugfs interface"
888 depends on CMA && DEBUG_FS
889 help
890 Turns on the DebugFS interface for CMA.
891
43ca106f
MK
892config CMA_SYSFS
893 bool "CMA information through sysfs interface"
894 depends on CMA && SYSFS
895 help
896 This option exposes some sysfs attributes to get information
897 from CMA.
898
a254129e
JK
899config CMA_AREAS
900 int "Maximum count of the CMA areas"
901 depends on CMA
b7176c26 902 default 19 if NUMA
a254129e
JK
903 default 7
904 help
905 CMA allows to create CMA areas for particular purpose, mainly,
906 used as device private area. This parameter sets the maximum
907 number of CMA area in the system.
908
b7176c26 909 If unsure, leave the default value "7" in UMA and "19" in NUMA.
a254129e 910
af8d417a
DS
911config MEM_SOFT_DIRTY
912 bool "Track memory changes"
913 depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
914 select PROC_PAGE_MONITOR
4e2e2770 915 help
af8d417a
DS
916 This option enables memory changes tracking by introducing a
917 soft-dirty bit on pte-s. This bit it set when someone writes
918 into a page just as regular dirty bit, but unlike the latter
919 it can be cleared by hands.
920
1ad1335d 921 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
4e2e2770 922
9e5c33d7
MS
923config GENERIC_EARLY_IOREMAP
924 bool
042d27ac 925
22ee3ea5
HD
926config STACK_MAX_DEFAULT_SIZE_MB
927 int "Default maximum user stack size for 32-bit processes (MB)"
928 default 100
042d27ac
HD
929 range 8 2048
930 depends on STACK_GROWSUP && (!64BIT || COMPAT)
931 help
932 This is the maximum stack size in Megabytes in the VM layout of 32-bit
933 user processes when the stack grows upwards (currently only on parisc
22ee3ea5 934 arch) when the RLIMIT_STACK hard limit is unlimited.
042d27ac 935
22ee3ea5 936 A sane initial value is 100 MB.
3a80a7fa 937
3a80a7fa 938config DEFERRED_STRUCT_PAGE_INIT
1ce22103 939 bool "Defer initialisation of struct pages to kthreads"
d39f8fb4 940 depends on SPARSEMEM
ab1e8d89 941 depends on !NEED_PER_CPU_KM
889c695d 942 depends on 64BIT
e4443149 943 select PADATA
3a80a7fa
MG
944 help
945 Ordinarily all struct pages are initialised during early boot in a
946 single thread. On very large machines this can take a considerable
947 amount of time. If this option is set, large machines will bring up
e4443149
DJ
948 a subset of memmap at boot and then initialise the rest in parallel.
949 This has a potential performance impact on tasks running early in the
1ce22103
VB
950 lifetime of the system until these kthreads finish the
951 initialisation.
033fbae9 952
1c676e0d
SP
953config PAGE_IDLE_FLAG
954 bool
955 select PAGE_EXTENSION if !64BIT
956 help
957 This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
958 bit writers can set the state of the bit in the flags so that PTE
959 Accessed bit readers may avoid disturbance.
960
33c3fc71
VD
961config IDLE_PAGE_TRACKING
962 bool "Enable idle page tracking"
963 depends on SYSFS && MMU
1c676e0d 964 select PAGE_IDLE_FLAG
33c3fc71
VD
965 help
966 This feature allows to estimate the amount of user pages that have
967 not been touched during a given period of time. This information can
968 be useful to tune memory cgroup limits and/or for job placement
969 within a compute cluster.
970
1ad1335d
MR
971 See Documentation/admin-guide/mm/idle_page_tracking.rst for
972 more details.
33c3fc71 973
c2280be8
AK
974config ARCH_HAS_CACHE_LINE_SIZE
975 bool
976
2792d84e
KC
977config ARCH_HAS_CURRENT_STACK_POINTER
978 bool
979 help
980 In support of HARDENED_USERCOPY performing stack variable lifetime
981 checking, an architecture-agnostic way to find the stack pointer
982 is needed. Once an architecture defines an unsigned long global
983 register alias named "current_stack_pointer", this config can be
984 selected.
985
17596731 986config ARCH_HAS_PTE_DEVMAP
65f7d049
OH
987 bool
988
63703f37
KW
989config ARCH_HAS_ZONE_DMA_SET
990 bool
991
992config ZONE_DMA
993 bool "Support DMA zone" if ARCH_HAS_ZONE_DMA_SET
994 default y if ARM64 || X86
995
996config ZONE_DMA32
997 bool "Support DMA32 zone" if ARCH_HAS_ZONE_DMA_SET
998 depends on !X86_32
999 default y if ARM64
1000
033fbae9 1001config ZONE_DEVICE
5042db43 1002 bool "Device memory (pmem, HMM, etc...) hotplug support"
033fbae9
DW
1003 depends on MEMORY_HOTPLUG
1004 depends on MEMORY_HOTREMOVE
99490f16 1005 depends on SPARSEMEM_VMEMMAP
17596731 1006 depends on ARCH_HAS_PTE_DEVMAP
3a08cd52 1007 select XARRAY_MULTI
033fbae9
DW
1008
1009 help
1010 Device memory hotplug support allows for establishing pmem,
1011 or other device driver discovered memory regions, in the
1012 memmap. This allows pfn_to_page() lookups of otherwise
1013 "device-physical" addresses which is needed for using a DAX
1014 mapping in an O_DIRECT operation, among other things.
1015
1016 If FS_DAX is enabled, then say Y.
06a660ad 1017
9c240a7b
CH
1018#
1019# Helpers to mirror range of the CPU page tables of a process into device page
1020# tables.
1021#
c0b12405 1022config HMM_MIRROR
9c240a7b 1023 bool
f442c283 1024 depends on MMU
c0b12405 1025
14b80582
DW
1026config GET_FREE_REGION
1027 depends on SPARSEMEM
1028 bool
1029
5042db43
JG
1030config DEVICE_PRIVATE
1031 bool "Unaddressable device memory (GPU memory, ...)"
7328d9cc 1032 depends on ZONE_DEVICE
14b80582 1033 select GET_FREE_REGION
5042db43
JG
1034
1035 help
1036 Allows creation of struct pages to represent unaddressable device
1037 memory; i.e., memory that is only accessible from the device (or
1038 group of devices). You likely also want to select HMM_MIRROR.
1039
3e9a9e25
CH
1040config VMAP_PFN
1041 bool
1042
63c17fb8
DH
1043config ARCH_USES_HIGH_VMA_FLAGS
1044 bool
66d37570
DH
1045config ARCH_HAS_PKEYS
1046 bool
30a5b536 1047
b0284cd2
CM
1048config ARCH_USES_PG_ARCH_X
1049 bool
1050 help
1051 Enable the definition of PG_arch_x page flags with x > 1. Only
1052 suitable for 64-bit architectures with CONFIG_FLATMEM or
1053 CONFIG_SPARSEMEM_VMEMMAP enabled, otherwise there may not be
1054 enough room for additional bits in page->flags.
1055
0710d012
VB
1056config VM_EVENT_COUNTERS
1057 default y
1058 bool "Enable VM event counters for /proc/vmstat" if EXPERT
1059 help
1060 VM event counters are needed for event counts to be shown.
1061 This option allows the disabling of the VM event counters
1062 on EXPERT systems. /proc/vmstat will only show page counts
1063 if VM event counters are disabled.
1064
30a5b536
DZ
1065config PERCPU_STATS
1066 bool "Collect percpu memory statistics"
30a5b536
DZ
1067 help
1068 This feature collects and exposes statistics via debugfs. The
1069 information includes global and per chunk statistics, which can
1070 be used to help understand percpu memory usage.
64c349f4 1071
9c84f229
JH
1072config GUP_TEST
1073 bool "Enable infrastructure for get_user_pages()-related unit tests"
d0de8241 1074 depends on DEBUG_FS
64c349f4 1075 help
9c84f229
JH
1076 Provides /sys/kernel/debug/gup_test, which in turn provides a way
1077 to make ioctl calls that can launch kernel-based unit tests for
1078 the get_user_pages*() and pin_user_pages*() family of API calls.
64c349f4 1079
9c84f229
JH
1080 These tests include benchmark testing of the _fast variants of
1081 get_user_pages*() and pin_user_pages*(), as well as smoke tests of
1082 the non-_fast variants.
1083
f4f9bda4
JH
1084 There is also a sub-test that allows running dump_page() on any
1085 of up to eight pages (selected by command line args) within the
1086 range of user-space addresses. These pages are either pinned via
1087 pin_user_pages*(), or pinned via get_user_pages*(), as specified
1088 by other command line arguments.
1089
baa489fa 1090 See tools/testing/selftests/mm/gup_test.c
3010a5ea 1091
d0de8241
BS
1092comment "GUP_TEST needs to have DEBUG_FS enabled"
1093 depends on !GUP_TEST && !DEBUG_FS
3010a5ea 1094
6ca297d4 1095config GUP_GET_PXX_LOW_HIGH
39656e83
CH
1096 bool
1097
def85743
KB
1098config DMAPOOL_TEST
1099 tristate "Enable a module to run time tests on dma_pool"
1100 depends on HAS_DMA
1101 help
1102 Provides a test module that will allocate and free many blocks of
1103 various sizes and report how long it takes. This is intended to
1104 provide a consistent way to measure how changes to the
1105 dma_pool_alloc/free routines affect performance.
1106
3010a5ea
LD
1107config ARCH_HAS_PTE_SPECIAL
1108 bool
59e0b520 1109
cbd34da7
CH
1110#
1111# Some architectures require a special hugepage directory format that is
1112# required to support multiple hugepage sizes. For example a4fe3ce76
1113# "powerpc/mm: Allow more flexible layouts for hugepage pagetables"
1114# introduced it on powerpc. This allows for a more flexible hugepage
1115# pagetable layouts.
1116#
1117config ARCH_HAS_HUGEPD
1118 bool
1119
c5acad84
TH
1120config MAPPING_DIRTY_HELPERS
1121 bool
1122
298fa1ad
TG
1123config KMAP_LOCAL
1124 bool
1125
825c43f5
AB
1126config KMAP_LOCAL_NON_LINEAR_PTE_ARRAY
1127 bool
1128
1fbaf8fc
CH
1129# struct io_mapping based helper. Selected by drivers that need them
1130config IO_MAPPING
1131 bool
1507f512
MR
1132
1133config SECRETMEM
74947724
LB
1134 default y
1135 bool "Enable memfd_secret() system call" if EXPERT
1136 depends on ARCH_HAS_SET_DIRECT_MAP
1137 help
1138 Enable the memfd_secret() system call with the ability to create
1139 memory areas visible only in the context of the owning process and
1140 not mapped to other processes and other kernel page tables.
1507f512 1141
9a10064f
CC
1142config ANON_VMA_NAME
1143 bool "Anonymous VMA name support"
1144 depends on PROC_FS && ADVISE_SYSCALLS && MMU
1145
1146 help
1147 Allow naming anonymous virtual memory areas.
1148
1149 This feature allows assigning names to virtual memory areas. Assigned
1150 names can be later retrieved from /proc/pid/maps and /proc/pid/smaps
1151 and help identifying individual anonymous memory areas.
1152 Assigning a name to anonymous virtual memory area might prevent that
1153 area from being merged with adjacent virtual memory areas due to the
1154 difference in their name.
1155
430529b5
PX
1156config USERFAULTFD
1157 bool "Enable userfaultfd() system call"
1158 depends on MMU
1159 help
1160 Enable the userfaultfd() system call that allows to intercept and
1161 handle page faults in userland.
1162
1163config HAVE_ARCH_USERFAULTFD_WP
1164 bool
1165 help
1166 Arch has userfaultfd write protection support
1167
1168config HAVE_ARCH_USERFAULTFD_MINOR
1169 bool
1170 help
1171 Arch has userfaultfd minor fault support
1172
1db9dbc2 1173config PTE_MARKER_UFFD_WP
81e0f15f
PX
1174 bool "Userfaultfd write protection support for shmem/hugetlbfs"
1175 default y
1176 depends on HAVE_ARCH_USERFAULTFD_WP
1db9dbc2
PX
1177
1178 help
1179 Allows to create marker PTEs for userfaultfd write protection
1180 purposes. It is required to enable userfaultfd write protection on
1181 file-backed memory types like shmem and hugetlbfs.
1182
ac35a490 1183# multi-gen LRU {
ec1c86b2
YZ
1184config LRU_GEN
1185 bool "Multi-Gen LRU"
1186 depends on MMU
1187 # make sure folio->flags has enough spare bits
1188 depends on 64BIT || !SPARSEMEM || SPARSEMEM_VMEMMAP
1189 help
07017acb
YZ
1190 A high performance LRU implementation to overcommit memory. See
1191 Documentation/admin-guide/mm/multigen_lru.rst for details.
ec1c86b2 1192
354ed597
YZ
1193config LRU_GEN_ENABLED
1194 bool "Enable by default"
1195 depends on LRU_GEN
1196 help
1197 This option enables the multi-gen LRU by default.
1198
ac35a490
YZ
1199config LRU_GEN_STATS
1200 bool "Full stats for debugging"
1201 depends on LRU_GEN
1202 help
1203 Do not enable this option unless you plan to look at historical stats
1204 from evicted generations for debugging purpose.
1205
1206 This option has a per-memcg and per-node memory overhead.
1207# }
1208
0b6cc04f
SB
1209config ARCH_SUPPORTS_PER_VMA_LOCK
1210 def_bool n
1211
1212config PER_VMA_LOCK
1213 def_bool y
1214 depends on ARCH_SUPPORTS_PER_VMA_LOCK && MMU && SMP
1215 help
1216 Allow per-vma locking during page fault handling.
1217
1218 This feature allows locking each virtual memory area separately when
1219 handling page faults instead of taking mmap_lock.
1220
2224d848
SP
1221source "mm/damon/Kconfig"
1222
59e0b520 1223endmenu
This page took 1.185289 seconds and 4 git commands to generate.