Lines Matching +full:memory +full:- +full:to +full:- +full:memory
1 # SPDX-License-Identifier: GPL-2.0-only
3 menu "Memory Management options"
7 # add proper SWAP support to them, in which case this can be remove.
13 bool "Support for paging of anonymous memory (swap)"
17 This option allows you to choose whether you want to have support
19 used to provide more virtual memory than the actual RAM present
29 pages that are in the process of being swapped out and attempts to
30 compress them into a dynamically allocated RAM-based memory pool.
46 bool "Shrink the zswap pool on memory pressure"
52 written back to the backing swap device) on memory pressure.
57 and consume memory indefinitely.
68 a particular compression algorithm please refer to the benchmarks
139 This option enables code in the zsmalloc to collect various
141 information to userspace via debugfs.
145 int "Maximum number of physical pages per-zspage"
177 bool "Configure for minimal memory footprint"
181 Configures the slab allocator in a way to achieve minimal memory
190 bool "Allow slab caches to be merged"
193 For reduced kernel memory fragmentation, slab caches can be
195 This carries a risk of kernel heap overflows being able to
197 cache layout), which makes such heap attacks easier to exploit
199 can usually only damage objects in the same cache. To disable
215 Many kernel heap attacks try to target slab cache metadata and
217 sacrifices to harden the kernel slab allocator against common
225 Kernel heap attacks frequently depend on being able to create
226 specifically-sized allocations with user-controlled contents
228 target object. To avoid sharing these allocation buckets,
229 provide an explicitly separated set of buckets to be used for
230 user-controlled allocations. This may very slightly increase
231 memory fragmentation, though in practice it's only a handful
232 of extra pages since the bulk of user-controlled allocations
233 are relatively long-lived.
242 The statistics are useful to debug slab allocation behavior in
243 order find ways to optimize the allocator. This should never be
246 supports the determination of the most active slabs to figure
247 out which slabs are relevant to a particular load.
248 Try running: slabinfo -DA
256 that is local to a processor at the price of more indeterminism
268 on code address, which makes the attackers more difficult to spray
269 vulnerable memory objects on the heap for the purpose of exploiting
270 memory vulnerabilities.
272 Currently the number of copies is set to 16, a reasonably large value
273 that effectively diverges the memory objects allocated for different
275 limited degree of memory and CPU overhead that relates to hardware and
285 utilization of a direct-mapped memory-side-cache. See section
286 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
288 the presence of a memory-side-cache. There are also incidental
290 allocations to compliment SLAB_FREELIST_RANDOM, but the
309 This option changes the bootup default to heap randomization
311 /proc/sys/kernel/randomize_va_space to 2.
313 On non-ancient distros (post-2000 ones) N is usually a safe choice.
316 bool "Allow mmapped anonymous memory to be uninitialized"
320 Normally, and according to the Linux spec, anonymous memory obtained
321 from mmap() has its contents cleared before it is passed to
322 userspace. Enabling this config option allows you to request that
328 ELF-FDPIC binfmt's brk and stack allocator.
332 userspace. Since that isn't generally a problem on no-MMU systems,
333 it is normally safe to say Y here.
335 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
342 prompt "Memory model"
347 This option allows you to change some of the ways that
348 Linux manages its memory internally. Most users will
353 bool "Flat Memory"
356 This option is best suited for non-NUMA systems with
362 spaces and for features like NUMA and memory hotplug,
363 choose "Sparse Memory".
365 If unsure, choose this option (Flat Memory) over any other.
368 bool "Sparse Memory"
372 memory hot-plug systems. This is normal.
375 holes is their physical address space and allows memory
376 hot-plug and hot-remove.
378 If unsure, choose "Flat Memory" over this option.
419 SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
427 # to enable the feature of HugeTLB/dev_dax vmemmap optimization.
445 # Enable memblock support for scratch memory which is needed for kexec handover
449 # Don't discard allocated memory used to track "memory" and "reserved" memblocks
450 # after early boot, so it can still be used to test for validity of memory.
451 # Also, memblocks are updated with memory hot(un)plug.
455 # Keep arch NUMA mapping infrastructure post-init.
463 # IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via
470 # Only be set on architectures that have completely implemented memory hotplug
484 bool "Memory hotplug"
494 prompt "Memory Hotplug Default Online Type"
497 Default memory type for hotplugged memory.
499 This option sets the default policy setting for memory hotplug
500 onlining policy (/sys/devices/system/memory/auto_online_blocks) which
501 determines what happens to newly added memory regions. Policy setting
506 Select offline to defer onlining to drivers and user policy.
507 Select auto to let the kernel choose what zones to utilize.
508 Select online_kernel to generally allow kernel usage of this memory.
509 Select online_movable to generally disallow kernel usage of this memory.
513 See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
518 Hotplugged memory will not be onlined by default.
520 handle onlining of hotplug memory policy.
525 Select this if you want the kernel to automatically online
526 hotplugged memory into the zone it thinks is reasonable.
527 This memory may be utilized for kernel data.
532 Select this if you want the kernel to automatically online
533 hotplugged memory into a zone capable of being used for kernel
539 Select this if you want the kernel to automatically online
540 hotplug memory into ZONE_MOVABLE. This memory will generally
544 ZONE_NORMAL memory is available to describe hotplug memory,
545 otherwise hotplug memory may fail to online. For example,
546 sufficient kernel-capable memory (ZONE_NORMAL) must be
547 available to allocate page structs to describe ZONE_MOVABLE.
552 bool "Allow for memory hot remove"
567 # Heavily threaded applications may benefit from splitting the mm-wide
570 # Default to 4 for wider testing, though 8 might be more appropriate.
571 # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
572 # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
574 # a per-page lock leads to problems when multiple tables need to be locked
595 # support for memory balloon
600 # support for memory balloon compaction
602 bool "Allow for balloon memory compaction/migration"
606 Memory fragmentation introduced by ballooning might reduce
607 significantly the number of 2MB contiguous memory blocks that can be
610 by the guest workload. Allowing the compaction & migration for memory
611 pages enlisted as being part of memory balloon devices avoids the
612 scenario aforementioned and helps improving memory defragmentation.
615 # support for memory compaction
617 bool "Allow for memory compaction"
622 Compaction is the only memory management component to form
623 high order (larger physically contiguous) memory blocks
625 the lack of the feature can lead to unexpected OOM killer
626 invocations for high order memory requests. You shouldn't
628 it and then we would be really interested to hear about that at
629 linux-mm@kvack.org.
644 those pages to another entity, such as a hypervisor, so that the
645 memory can be freed within the host for other uses.
657 two situations. The first is on NUMA systems to put pages nearer
658 to the processors accessing. The second is when allocating huge
659 pages as migration can relocate pages to satisfy a huge page
674 Allows the pageblock_order value to be dynamic instead of just standard
679 clamped down to MAX_PAGE_ORDER.
685 int "Maximum scale factor of PCP (Per-CPU pageset) batch allocate/free"
689 In page allocator, PCP (Per-CPU pageset) is refilled and drained in
690 batches. The batch number is scaled automatically to improve page
692 latency. This option sets the upper limit of scale factor to limit
704 memory available to the CPU. Enabled by default when HIGHMEM is
705 selected, but you may say n to override this.
720 saving memory until one or another app needs to modify the content.
724 root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
727 int "Low address space to protect from user allocation"
731 This is the portion of low virtual memory which should be protected
732 from userspace allocation. Keeping a user from writing to low pages
738 Programs which use vm86 functionality or have some need to map
740 protection by setting the value to 0.
751 bool "Enable recovery from hardware memory errors"
754 Enables code to recover from some memory failures on systems
755 with MCA recovery. This allows a system to continue running
756 even when some of its memory has uncorrected errors. This requires
757 special hardware support and typically ECC memory.
769 The NOMMU mmap() frequently needs to allocate large contiguous chunks
770 of memory on which to store mappings, but it can only ask the system
771 allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
772 more than it requires. To deal with this, mmap() is able to trim off
773 the excess and return it to the allocator.
775 If trimming is enabled, the excess is trimmed off and returned to the
780 long-term mappings means that the space is wasted.
785 no trimming is to occur.
790 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
802 Enable this option to reduce the runtime refcounting overhead
805 from access to large folios for zeroing memory.
808 once and never freed. One full huge page's worth of memory shall
811 Say Y if your system has lots of memory. Say N if you are
812 memory constrained.
824 Transparent Hugepages allows the kernel to use huge pages and
825 huge tlb transparently to the applications whenever possible.
826 This feature can improve computing performance to certain
827 applications by speeding up page faults during memory
831 If memory constrained on embedded, you may want to say N.
846 memory footprint of applications without a guaranteed
853 performance improvement benefit to the applications using
854 madvise(MADV_HUGEPAGE) but it won't risk to increase the
855 memory footprint of applications without a guaranteed
876 bool "Read-only THP for filesystems (EXPERIMENTAL)"
880 Allow khugepaged to put read-only file-backed pages in THP.
887 bool "No per-page mapcount (EXPERIMENTAL)"
889 Do not maintain per-page mapcounts for pages part of larger
893 this information will rely on less-precise per-allocation information
894 instead: for example, using the average per-page mapcount in such
895 a large allocation instead of the per-page mapcount.
901 # simple helper to make the code a bit easier to read
911 # TODO: Allow to be enabled without THP
952 bool "Contiguous Memory Allocator"
957 This enables the Contiguous Memory Allocator which allows other
958 subsystems to allocate big physically-contiguous blocks of memory.
959 CMA reserves a region of memory and allows only movable pages to
960 be allocated from it. This way, the kernel can use the memory for
962 allocated pages are migrated away to serve the contiguous request.
976 This option exposes some sysfs attributes to get information
985 CMA allows to create CMA areas for particular purpose, mainly,
992 # Select this config option from the architecture Kconfig, if available, to set
1010 The page block order refers to the power of two number of pages that
1011 are physically contiguous and can have a migrate type associated to
1016 order when the page block order is required to be smaller than
1018 (see include/linux/pageblock-flags.h for details).
1027 bool "Track memory changes"
1031 This option enables memory changes tracking by introducing a
1032 soft-dirty bit on pte-s. This bit it set when someone writes
1036 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
1042 int "Default maximum user stack size for 32-bit processes (MB)"
1047 This is the maximum stack size in Megabytes in the VM layout of 32-bit
1054 bool "Defer initialisation of struct pages to kthreads"
1073 This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
1082 This feature allows to estimate the amount of user pages that have
1084 be useful to tune memory cgroup limits and/or for job placement
1087 See Documentation/admin-guide/mm/idle_page_tracking.rst for
1090 # Architectures which implement cpu_dcache_is_aliasing() to query
1092 # aliasing) need to select this.
1103 checking, an architecture-agnostic way to find the stack pointer
1121 bool "Device memory (pmem, HMM, etc...) hotplug support"
1128 Device memory hotplug support allows for establishing pmem,
1129 or other device driver discovered memory regions, in the
1131 "device-physical" addresses which is needed for using a DAX
1137 # Helpers to mirror range of the CPU page tables of a process into device page
1148 bool "Unaddressable device memory (GPU memory, ...)"
1153 Allows creation of struct pages to represent unaddressable device
1154 memory; i.e., memory that is only accessible from the device (or
1155 group of devices). You likely also want to select HMM_MIRROR.
1174 VM event counters are needed for event counts to be shown.
1180 bool "Collect percpu memory statistics"
1184 be used to help understand percpu memory usage.
1187 bool "Enable infrastructure for get_user_pages()-related unit tests"
1191 to make ioctl calls that can launch kernel-based unit tests for
1196 the non-_fast variants.
1198 There is also a sub-test that allows running dump_page() on any
1199 of up to eight pages (selected by command line args) within the
1200 range of user-space addresses. These pages are either pinned via
1206 comment "GUP_TEST needs to have DEBUG_FS enabled"
1213 tristate "Enable a module to run time tests on dma_pool"
1217 various sizes and report how long it takes. This is intended to
1218 provide a consistent way to measure how changes to the
1241 Enable the memfd_secret() system call with the ability to create
1242 memory areas visible only in the context of the owning process and
1243 not mapped to other processes and other kernel page tables.
1250 Allow naming anonymous virtual memory areas.
1252 This feature allows assigning names to virtual memory areas. Assigned
1254 and help identifying individual anonymous memory areas.
1255 Assigning a name to anonymous virtual memory area might prevent that
1256 area from being merged with adjacent virtual memory areas due to the
1273 Enable the userfaultfd() system call that allows to intercept and
1283 Allows to create marker PTEs for userfaultfd write protection
1284 purposes. It is required to enable userfaultfd write protection on
1285 file-backed memory types like shmem and hugetlbfs.
1288 # multi-gen LRU {
1290 bool "Multi-Gen LRU"
1292 # make sure folio->flags has enough spare bits
1295 A high performance LRU implementation to overcommit memory. See
1296 Documentation/admin-guide/mm/multigen_lru.rst for details.
1302 This option enables the multi-gen LRU by default.
1308 Do not enable this option unless you plan to look at historical stats
1311 This option has a per-memcg and per-node memory overhead.
1325 Allow per-vma locking during page fault handling.
1327 This feature allows locking each virtual memory area separately when
1356 stacks (eg, x86 CET, arm64 GCS or RISC-V Zicfiss).
1367 Try to reclaim empty user page table pages in paths other than munmap