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.
16 bool "Support for paging of anonymous memory (swap)"
20 This option allows you to choose whether you want to have support
22 used to provide more virtual memory than the actual RAM present
32 pages that are in the process of being swapped out and attempts to
33 compress them into a dynamically allocated RAM-based memory pool.
49 bool "Shrink the zswap pool on memory pressure"
55 written back to the backing swap device) on memory pressure.
60 and consume memory indefinitely.
71 a particular compression algorithm please refer to the benchmarks
160 zsmalloc is a slab-based memory allocator designed to store
169 This option enables code in the zsmalloc to collect various
171 information to userspace via debugfs.
175 int "Maximum number of physical pages per-zspage"
203 bool "Configure for minimal memory footprint"
207 Configures the slab allocator in a way to achieve minimal memory
216 bool "Allow slab caches to be merged"
219 For reduced kernel memory fragmentation, slab caches can be
221 This carries a risk of kernel heap overflows being able to
223 cache layout), which makes such heap attacks easier to exploit
225 can usually only damage objects in the same cache. To disable
241 Many kernel heap attacks try to target slab cache metadata and
243 sacrifices to harden the kernel slab allocator against common
251 Kernel heap attacks frequently depend on being able to create
252 specifically-sized allocations with user-controlled contents
254 target object. To avoid sharing these allocation buckets,
255 provide an explicitly separated set of buckets to be used for
256 user-controlled allocations. This may very slightly increase
257 memory fragmentation, though in practice it's only a handful
258 of extra pages since the bulk of user-controlled allocations
259 are relatively long-lived.
268 The statistics are useful to debug slab allocation behavior in
269 order find ways to optimize the allocator. This should never be
272 supports the determination of the most active slabs to figure
273 out which slabs are relevant to a particular load.
274 Try running: slabinfo -DA
282 that is local to a processor at the price of more indeterminism
294 on code address, which makes the attackers more difficult to spray
295 vulnerable memory objects on the heap for the purpose of exploiting
296 memory vulnerabilities.
298 Currently the number of copies is set to 16, a reasonably large value
299 that effectively diverges the memory objects allocated for different
301 limited degree of memory and CPU overhead that relates to hardware and
311 utilization of a direct-mapped memory-side-cache. See section
312 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
314 the presence of a memory-side-cache. There are also incidental
316 allocations to compliment SLAB_FREELIST_RANDOM, but the
335 This option changes the bootup default to heap randomization
337 /proc/sys/kernel/randomize_va_space to 2.
339 On non-ancient distros (post-2000 ones) N is usually a safe choice.
342 bool "Allow mmapped anonymous memory to be uninitialized"
346 Normally, and according to the Linux spec, anonymous memory obtained
347 from mmap() has its contents cleared before it is passed to
348 userspace. Enabling this config option allows you to request that
354 ELF-FDPIC binfmt's brk and stack allocator.
358 userspace. Since that isn't generally a problem on no-MMU systems,
359 it is normally safe to say Y here.
361 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
368 prompt "Memory model"
373 This option allows you to change some of the ways that
374 Linux manages its memory internally. Most users will
379 bool "Flat Memory"
382 This option is best suited for non-NUMA systems with
388 spaces and for features like NUMA and memory hotplug,
389 choose "Sparse Memory".
391 If unsure, choose this option (Flat Memory) over any other.
394 bool "Sparse Memory"
398 memory hot-plug systems. This is normal.
401 holes is their physical address space and allows memory
402 hot-plug and hot-remove.
404 If unsure, choose "Flat Memory" over this option.
442 bool "Sparse Memory virtual memmap"
446 SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
454 # to enable the feature of HugeTLB/dev_dax vmemmap optimization.
472 # Don't discard allocated memory used to track "memory" and "reserved" memblocks
473 # after early boot, so it can still be used to test for validity of memory.
474 # Also, memblocks are updated with memory hot(un)plug.
478 # Keep arch NUMA mapping infrastructure post-init.
486 # IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via
493 # Only be set on architectures that have completely implemented memory hotplug
507 bool "Memory hotplug"
517 prompt "Memory Hotplug Default Online Type"
520 Default memory type for hotplugged memory.
522 This option sets the default policy setting for memory hotplug
523 onlining policy (/sys/devices/system/memory/auto_online_blocks) which
524 determines what happens to newly added memory regions. Policy setting
529 Select offline to defer onlining to drivers and user policy.
530 Select auto to let the kernel choose what zones to utilize.
531 Select online_kernel to generally allow kernel usage of this memory.
532 Select online_movable to generally disallow kernel usage of this memory.
536 See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
541 Hotplugged memory will not be onlined by default.
543 handle onlining of hotplug memory policy.
548 Select this if you want the kernel to automatically online
549 hotplugged memory into the zone it thinks is reasonable.
550 This memory may be utilized for kernel data.
555 Select this if you want the kernel to automatically online
556 hotplugged memory into a zone capable of being used for kernel
562 Select this if you want the kernel to automatically online
563 hotplug memory into ZONE_MOVABLE. This memory will generally
567 ZONE_NORMAL memory is available to describe hotplug memory,
568 otherwise hotplug memory may fail to online. For example,
569 sufficient kernel-capable memory (ZONE_NORMAL) must be
570 available to allocate page structs to describe ZONE_MOVABLE.
575 bool "Allow for memory hot remove"
590 # Heavily threaded applications may benefit from splitting the mm-wide
593 # Default to 4 for wider testing, though 8 might be more appropriate.
594 # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
595 # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
597 # a per-page lock leads to problems when multiple tables need to be locked
618 # support for memory balloon
623 # support for memory balloon compaction
625 bool "Allow for balloon memory compaction/migration"
629 Memory fragmentation introduced by ballooning might reduce
630 significantly the number of 2MB contiguous memory blocks that can be
633 by the guest workload. Allowing the compaction & migration for memory
634 pages enlisted as being part of memory balloon devices avoids the
635 scenario aforementioned and helps improving memory defragmentation.
638 # support for memory compaction
640 bool "Allow for memory compaction"
645 Compaction is the only memory management component to form
646 high order (larger physically contiguous) memory blocks
648 the lack of the feature can lead to unexpected OOM killer
649 invocations for high order memory requests. You shouldn't
651 it and then we would be really interested to hear about that at
652 linux-mm@kvack.org.
667 those pages to another entity, such as a hypervisor, so that the
668 memory can be freed within the host for other uses.
680 two situations. The first is on NUMA systems to put pages nearer
681 to the processors accessing. The second is when allocating huge
682 pages as migration can relocate pages to satisfy a huge page
697 Allows the pageblock_order value to be dynamic instead of just standard
702 clamped down to MAX_PAGE_ORDER.
708 int "Maximum scale factor of PCP (Per-CPU pageset) batch allocate/free"
712 In page allocator, PCP (Per-CPU pageset) is refilled and drained in
713 batches. The batch number is scaled automatically to improve page
715 latency. This option sets the upper limit of scale factor to limit
727 memory available to the CPU. Enabled by default when HIGHMEM is
728 selected, but you may say n to override this.
743 saving memory until one or another app needs to modify the content.
747 root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
750 int "Low address space to protect from user allocation"
754 This is the portion of low virtual memory which should be protected
755 from userspace allocation. Keeping a user from writing to low pages
761 Programs which use vm86 functionality or have some need to map
763 protection by setting the value to 0.
774 bool "Enable recovery from hardware memory errors"
778 Enables code to recover from some memory failures on systems
779 with MCA recovery. This allows a system to continue running
780 even when some of its memory has uncorrected errors. This requires
781 special hardware support and typically ECC memory.
793 The NOMMU mmap() frequently needs to allocate large contiguous chunks
794 of memory on which to store mappings, but it can only ask the system
795 allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
796 more than it requires. To deal with this, mmap() is able to trim off
797 the excess and return it to the allocator.
799 If trimming is enabled, the excess is trimmed off and returned to the
804 long-term mappings means that the space is wasted.
809 no trimming is to occur.
814 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
832 Transparent Hugepages allows the kernel to use huge pages and
833 huge tlb transparently to the applications whenever possible.
834 This feature can improve computing performance to certain
835 applications by speeding up page faults during memory
839 If memory constrained on embedded, you may want to say N.
854 memory footprint of applications without a guaranteed
861 performance improvement benefit to the applications using
862 madvise(MADV_HUGEPAGE) but it won't risk to increase the
863 memory footprint of applications without a guaranteed
884 bool "Read-only THP for filesystems (EXPERIMENTAL)"
888 Allow khugepaged to put read-only file-backed pages in THP.
895 bool "No per-page mapcount (EXPERIMENTAL)"
897 Do not maintain per-page mapcounts for pages part of larger
901 this information will rely on less-precise per-allocation information
902 instead: for example, using the average per-page mapcount in such
903 a large allocation instead of the per-page mapcount.
909 # simple helper to make the code a bit easier to read
919 # TODO: Allow to be enabled without THP
953 bool "Contiguous Memory Allocator"
958 This enables the Contiguous Memory Allocator which allows other
959 subsystems to allocate big physically-contiguous blocks of memory.
960 CMA reserves a region of memory and allows only movable pages to
961 be allocated from it. This way, the kernel can use the memory for
963 allocated pages are migrated away to serve the contiguous request.
977 This option exposes some sysfs attributes to get information
986 CMA allows to create CMA areas for particular purpose, mainly,
993 bool "Track memory changes"
997 This option enables memory changes tracking by introducing a
998 soft-dirty bit on pte-s. This bit it set when someone writes
1002 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
1008 int "Default maximum user stack size for 32-bit processes (MB)"
1013 This is the maximum stack size in Megabytes in the VM layout of 32-bit
1020 bool "Defer initialisation of struct pages to kthreads"
1039 This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
1048 This feature allows to estimate the amount of user pages that have
1050 be useful to tune memory cgroup limits and/or for job placement
1053 See Documentation/admin-guide/mm/idle_page_tracking.rst for
1056 # Architectures which implement cpu_dcache_is_aliasing() to query
1058 # aliasing) need to select this.
1069 checking, an architecture-agnostic way to find the stack pointer
1090 bool "Device memory (pmem, HMM, etc...) hotplug support"
1098 Device memory hotplug support allows for establishing pmem,
1099 or other device driver discovered memory regions, in the
1101 "device-physical" addresses which is needed for using a DAX
1107 # Helpers to mirror range of the CPU page tables of a process into device page
1118 bool "Unaddressable device memory (GPU memory, ...)"
1123 Allows creation of struct pages to represent unaddressable device
1124 memory; i.e., memory that is only accessible from the device (or
1125 group of devices). You likely also want to select HMM_MIRROR.
1144 VM event counters are needed for event counts to be shown.
1150 bool "Collect percpu memory statistics"
1154 be used to help understand percpu memory usage.
1157 bool "Enable infrastructure for get_user_pages()-related unit tests"
1161 to make ioctl calls that can launch kernel-based unit tests for
1166 the non-_fast variants.
1168 There is also a sub-test that allows running dump_page() on any
1169 of up to eight pages (selected by command line args) within the
1170 range of user-space addresses. These pages are either pinned via
1176 comment "GUP_TEST needs to have DEBUG_FS enabled"
1183 tristate "Enable a module to run time tests on dma_pool"
1187 various sizes and report how long it takes. This is intended to
1188 provide a consistent way to measure how changes to the
1215 Enable the memfd_secret() system call with the ability to create
1216 memory areas visible only in the context of the owning process and
1217 not mapped to other processes and other kernel page tables.
1224 Allow naming anonymous virtual memory areas.
1226 This feature allows assigning names to virtual memory areas. Assigned
1228 and help identifying individual anonymous memory areas.
1229 Assigning a name to anonymous virtual memory area might prevent that
1230 area from being merged with adjacent virtual memory areas due to the
1247 Enable the userfaultfd() system call that allows to intercept and
1257 Allows to create marker PTEs for userfaultfd write protection
1258 purposes. It is required to enable userfaultfd write protection on
1259 file-backed memory types like shmem and hugetlbfs.
1262 # multi-gen LRU {
1264 bool "Multi-Gen LRU"
1266 # make sure folio->flags has enough spare bits
1269 A high performance LRU implementation to overcommit memory. See
1270 Documentation/admin-guide/mm/multigen_lru.rst for details.
1276 This option enables the multi-gen LRU by default.
1282 Do not enable this option unless you plan to look at historical stats
1285 This option has a per-memcg and per-node memory overhead.
1299 Allow per-vma locking during page fault handling.
1301 This feature allows locking each virtual memory area separately when
1329 stacks (eg, x86 CET, arm64 GCS or RISC-V Zicfiss).
1340 Try to reclaim empty user page table pages in paths other than munmap