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
178 It is designed to store up to two compressed pages per physical
180 deterministic reclaim properties that make it preferable to a higher
189 linux-[email protected] and the zswap maintainers.
192 It is designed to store up to three compressed pages per physical
207 zsmalloc is a slab-based memory allocator designed to store
216 This option enables code in the zsmalloc to collect various
218 information to userspace via debugfs.
222 int "Maximum number of physical pages per-zspage"
246 bool "Configure for minimal memory footprint"
250 Configures the slab allocator in a way to achieve minimal memory
259 bool "Allow slab caches to be merged"
262 For reduced kernel memory fragmentation, slab caches can be
264 This carries a risk of kernel heap overflows being able to
266 cache layout), which makes such heap attacks easier to exploit
268 can usually only damage objects in the same cache. To disable
284 Many kernel heap attacks try to target slab cache metadata and
286 sacrifices to harden the kernel slab allocator against common
294 Kernel heap attacks frequently depend on being able to create
295 specifically-sized allocations with user-controlled contents
297 target object. To avoid sharing these allocation buckets,
298 provide an explicitly separated set of buckets to be used for
299 user-controlled allocations. This may very slightly increase
300 memory fragmentation, though in practice it's only a handful
301 of extra pages since the bulk of user-controlled allocations
302 are relatively long-lived.
311 The statistics are useful to debug slab allocation behavior in
312 order find ways to optimize the allocator. This should never be
315 supports the determination of the most active slabs to figure
316 out which slabs are relevant to a particular load.
317 Try running: slabinfo -DA
325 that is local to a processor at the price of more indeterminism
337 on code address, which makes the attackers more difficult to spray
338 vulnerable memory objects on the heap for the purpose of exploiting
339 memory vulnerabilities.
341 Currently the number of copies is set to 16, a reasonably large value
342 that effectively diverges the memory objects allocated for different
344 limited degree of memory and CPU overhead that relates to hardware and
354 utilization of a direct-mapped memory-side-cache. See section
355 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
357 the presence of a memory-side-cache. There are also incidental
359 allocations to compliment SLAB_FREELIST_RANDOM, but the
378 This option changes the bootup default to heap randomization
380 /proc/sys/kernel/randomize_va_space to 2.
382 On non-ancient distros (post-2000 ones) N is usually a safe choice.
385 bool "Allow mmapped anonymous memory to be uninitialized"
389 Normally, and according to the Linux spec, anonymous memory obtained
390 from mmap() has its contents cleared before it is passed to
391 userspace. Enabling this config option allows you to request that
397 ELF-FDPIC binfmt's brk and stack allocator.
401 userspace. Since that isn't generally a problem on no-MMU systems,
402 it is normally safe to say Y here.
404 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
411 prompt "Memory model"
416 This option allows you to change some of the ways that
417 Linux manages its memory internally. Most users will
422 bool "Flat Memory"
425 This option is best suited for non-NUMA systems with
431 spaces and for features like NUMA and memory hotplug,
432 choose "Sparse Memory".
434 If unsure, choose this option (Flat Memory) over any other.
437 bool "Sparse Memory"
441 memory hot-plug systems. This is normal.
444 holes is their physical address space and allows memory
445 hot-plug and hot-remove.
447 If unsure, choose "Flat Memory" over this option.
485 bool "Sparse Memory virtual memmap"
489 SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
494 # to enable the feature of HugeTLB/dev_dax vmemmap optimization.
509 # Don't discard allocated memory used to track "memory" and "reserved" memblocks
510 # after early boot, so it can still be used to test for validity of memory.
511 # Also, memblocks are updated with memory hot(un)plug.
515 # Keep arch NUMA mapping infrastructure post-init.
523 # IORESOURCE_EXCLUSIVE cannot be mapped to user space, for example, via
530 # Only be set on architectures that have completely implemented memory hotplug
544 bool "Memory hotplug"
554 prompt "Memory Hotplug Default Online Type"
557 Default memory type for hotplugged memory.
559 This option sets the default policy setting for memory hotplug
560 onlining policy (/sys/devices/system/memory/auto_online_blocks) which
561 determines what happens to newly added memory regions. Policy setting
566 Select offline to defer onlining to drivers and user policy.
567 Select auto to let the kernel choose what zones to utilize.
568 Select online_kernel to generally allow kernel usage of this memory.
569 Select online_movable to generally disallow kernel usage of this memory.
573 See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
578 Hotplugged memory will not be onlined by default.
580 handle onlining of hotplug memory policy.
585 Select this if you want the kernel to automatically online
586 hotplugged memory into the zone it thinks is reasonable.
587 This memory may be utilized for kernel data.
592 Select this if you want the kernel to automatically online
593 hotplugged memory into a zone capable of being used for kernel
599 Select this if you want the kernel to automatically online
600 hotplug memory into ZONE_MOVABLE. This memory will generally
604 ZONE_NORMAL memory is available to describe hotplug memory,
605 otherwise hotplug memory may fail to online. For example,
606 sufficient kernel-capable memory (ZONE_NORMAL) must be
607 available to allocate page structs to describe ZONE_MOVABLE.
612 bool "Allow for memory hot remove"
627 # Heavily threaded applications may benefit from splitting the mm-wide
630 # Default to 4 for wider testing, though 8 might be more appropriate.
631 # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
632 # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
634 # a per-page lock leads to problems when multiple tables need to be locked
655 # support for memory balloon
660 # support for memory balloon compaction
662 bool "Allow for balloon memory compaction/migration"
666 Memory fragmentation introduced by ballooning might reduce
667 significantly the number of 2MB contiguous memory blocks that can be
670 by the guest workload. Allowing the compaction & migration for memory
671 pages enlisted as being part of memory balloon devices avoids the
672 scenario aforementioned and helps improving memory defragmentation.
675 # support for memory compaction
677 bool "Allow for memory compaction"
682 Compaction is the only memory management component to form
683 high order (larger physically contiguous) memory blocks
685 the lack of the feature can lead to unexpected OOM killer
686 invocations for high order memory requests. You shouldn't
688 it and then we would be really interested to hear about that at
689 linux-[email protected].
704 those pages to another entity, such as a hypervisor, so that the
705 memory can be freed within the host for other uses.
717 two situations. The first is on NUMA systems to put pages nearer
718 to the processors accessing. The second is when allocating huge
719 pages as migration can relocate pages to satisfy a huge page
734 Allows the pageblock_order value to be dynamic instead of just standard
739 clamped down to MAX_PAGE_ORDER.
745 int "Maximum scale factor of PCP (Per-CPU pageset) batch allocate/free"
749 In page allocator, PCP (Per-CPU pageset) is refilled and drained in
750 batches. The batch number is scaled automatically to improve page
752 latency. This option sets the upper limit of scale factor to limit
764 memory available to the CPU. Enabled by default when HIGHMEM is
765 selected, but you may say n to override this.
780 saving memory until one or another app needs to modify the content.
784 root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
787 int "Low address space to protect from user allocation"
791 This is the portion of low virtual memory which should be protected
792 from userspace allocation. Keeping a user from writing to low pages
798 Programs which use vm86 functionality or have some need to map
800 protection by setting the value to 0.
811 bool "Enable recovery from hardware memory errors"
815 Enables code to recover from some memory failures on systems
816 with MCA recovery. This allows a system to continue running
817 even when some of its memory has uncorrected errors. This requires
818 special hardware support and typically ECC memory.
830 The NOMMU mmap() frequently needs to allocate large contiguous chunks
831 of memory on which to store mappings, but it can only ask the system
832 allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
833 more than it requires. To deal with this, mmap() is able to trim off
834 the excess and return it to the allocator.
836 If trimming is enabled, the excess is trimmed off and returned to the
841 long-term mappings means that the space is wasted.
846 no trimming is to occur.
851 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
865 Transparent Hugepages allows the kernel to use huge pages and
866 huge tlb transparently to the applications whenever possible.
867 This feature can improve computing performance to certain
868 applications by speeding up page faults during memory
872 If memory constrained on embedded, you may want to say N.
887 memory footprint of applications without a guaranteed
894 performance improvement benefit to the applications using
895 madvise(MADV_HUGEPAGE) but it won't risk to increase the
896 memory footprint of applications without a guaranteed
917 bool "Read-only THP for filesystems (EXPERIMENTAL)"
921 Allow khugepaged to put read-only file-backed pages in THP.
935 # TODO: Allow to be enabled without THP
969 bool "Contiguous Memory Allocator"
974 This enables the Contiguous Memory Allocator which allows other
975 subsystems to allocate big physically-contiguous blocks of memory.
976 CMA reserves a region of memory and allows only movable pages to
977 be allocated from it. This way, the kernel can use the memory for
979 allocated pages are migrated away to serve the contiguous request.
993 This option exposes some sysfs attributes to get information
1002 CMA allows to create CMA areas for particular purpose, mainly,
1009 bool "Track memory changes"
1013 This option enables memory changes tracking by introducing a
1014 soft-dirty bit on pte-s. This bit it set when someone writes
1018 See Documentation/admin-guide/mm/soft-dirty.rst for more details.
1024 int "Default maximum user stack size for 32-bit processes (MB)"
1029 This is the maximum stack size in Megabytes in the VM layout of 32-bit
1036 bool "Defer initialisation of struct pages to kthreads"
1055 This adds PG_idle and PG_young flags to 'struct page'. PTE Accessed
1064 This feature allows to estimate the amount of user pages that have
1066 be useful to tune memory cgroup limits and/or for job placement
1069 See Documentation/admin-guide/mm/idle_page_tracking.rst for
1072 # Architectures which implement cpu_dcache_is_aliasing() to query
1074 # aliasing) need to select this.
1085 checking, an architecture-agnostic way to find the stack pointer
1106 bool "Device memory (pmem, HMM, etc...) hotplug support"
1114 Device memory hotplug support allows for establishing pmem,
1115 or other device driver discovered memory regions, in the
1117 "device-physical" addresses which is needed for using a DAX
1123 # Helpers to mirror range of the CPU page tables of a process into device page
1134 bool "Unaddressable device memory (GPU memory, ...)"
1139 Allows creation of struct pages to represent unaddressable device
1140 memory; i.e., memory that is only accessible from the device (or
1141 group of devices). You likely also want to select HMM_MIRROR.
1160 VM event counters are needed for event counts to be shown.
1166 bool "Collect percpu memory statistics"
1170 be used to help understand percpu memory usage.
1173 bool "Enable infrastructure for get_user_pages()-related unit tests"
1177 to make ioctl calls that can launch kernel-based unit tests for
1182 the non-_fast variants.
1184 There is also a sub-test that allows running dump_page() on any
1185 of up to eight pages (selected by command line args) within the
1186 range of user-space addresses. These pages are either pinned via
1192 comment "GUP_TEST needs to have DEBUG_FS enabled"
1199 tristate "Enable a module to run time tests on dma_pool"
1203 various sizes and report how long it takes. This is intended to
1204 provide a consistent way to measure how changes to the
1231 Enable the memfd_secret() system call with the ability to create
1232 memory areas visible only in the context of the owning process and
1233 not mapped to other processes and other kernel page tables.
1240 Allow naming anonymous virtual memory areas.
1242 This feature allows assigning names to virtual memory areas. Assigned
1244 and help identifying individual anonymous memory areas.
1245 Assigning a name to anonymous virtual memory area might prevent that
1246 area from being merged with adjacent virtual memory areas due to the
1263 Enable the userfaultfd() system call that allows to intercept and
1273 Allows to create marker PTEs for userfaultfd write protection
1274 purposes. It is required to enable userfaultfd write protection on
1275 file-backed memory types like shmem and hugetlbfs.
1278 # multi-gen LRU {
1280 bool "Multi-Gen LRU"
1282 # make sure folio->flags has enough spare bits
1285 A high performance LRU implementation to overcommit memory. See
1286 Documentation/admin-guide/mm/multigen_lru.rst for details.
1292 This option enables the multi-gen LRU by default.
1298 Do not enable this option unless you plan to look at historical stats
1301 This option has a per-memcg and per-node memory overhead.
1315 Allow per-vma locking during page fault handling.
1317 This feature allows locking each virtual memory area separately when
1345 stacks (eg, x86 CET, arm64 GCS or RISC-V Zicfiss).
1356 Try to reclaim empty user page table pages in paths other than munmap