Kconfig (902861e34c401696ed9ad17a54c8790e7e8e3069) Kconfig (cd14b01846612f3f3277e97bfbecba4c8cee5ce9)
1# SPDX-License-Identifier: GPL-2.0-only
2
3menu "Memory Management options"
4
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#

--- 31 unchanged lines hidden (view full) ---

40 depends on ZSWAP
41 help
42 If selected, the compressed cache for swap pages will be enabled
43 at boot, otherwise it will be disabled.
44
45 The selection made here can be overridden by using the kernel
46 command line 'zswap.enabled=' option.
47
1# SPDX-License-Identifier: GPL-2.0-only
2
3menu "Memory Management options"
4
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#

--- 31 unchanged lines hidden (view full) ---

40 depends on ZSWAP
41 help
42 If selected, the compressed cache for swap pages will be enabled
43 at boot, otherwise it will be disabled.
44
45 The selection made here can be overridden by using the kernel
46 command line 'zswap.enabled=' option.
47
48config ZSWAP_EXCLUSIVE_LOADS_DEFAULT_ON
49 bool "Invalidate zswap entries when pages are loaded"
50 depends on ZSWAP
51 help
52 If selected, exclusive loads for zswap will be enabled at boot,
53 otherwise it will be disabled.
54
55 If exclusive loads are enabled, when a page is loaded from zswap,
56 the zswap entry is invalidated at once, as opposed to leaving it
57 in zswap until the swap entry is freed.
58
59 This avoids having two copies of the same page in memory
60 (compressed and uncompressed) after faulting in a page from zswap.
61 The cost is that if the page was never dirtied and needs to be
62 swapped out again, it will be re-compressed.
63
48config ZSWAP_SHRINKER_DEFAULT_ON
49 bool "Shrink the zswap pool on memory pressure"
50 depends on ZSWAP
51 default n
52 help
53 If selected, the zswap shrinker will be enabled, and the pages
54 stored in the zswap pool will become available for reclaim (i.e
55 written back to the backing swap device) on memory pressure.

--- 522 unchanged lines hidden (view full) ---

578# support for memory balloon
579config MEMORY_BALLOON
580 bool
581
582#
583# support for memory balloon compaction
584config BALLOON_COMPACTION
585 bool "Allow for balloon memory compaction/migration"
64config ZSWAP_SHRINKER_DEFAULT_ON
65 bool "Shrink the zswap pool on memory pressure"
66 depends on ZSWAP
67 default n
68 help
69 If selected, the zswap shrinker will be enabled, and the pages
70 stored in the zswap pool will become available for reclaim (i.e
71 written back to the backing swap device) on memory pressure.

--- 522 unchanged lines hidden (view full) ---

594# support for memory balloon
595config MEMORY_BALLOON
596 bool
597
598#
599# support for memory balloon compaction
600config BALLOON_COMPACTION
601 bool "Allow for balloon memory compaction/migration"
586 def_bool y
602 default y
587 depends on COMPACTION && MEMORY_BALLOON
588 help
589 Memory fragmentation introduced by ballooning might reduce
590 significantly the number of 2MB contiguous memory blocks that can be
591 used within a guest, thus imposing performance penalties associated
592 with the reduced number of transparent huge pages that could be used
593 by the guest workload. Allowing the compaction & migration for memory
594 pages enlisted as being part of memory balloon devices avoids the
595 scenario aforementioned and helps improving memory defragmentation.
596
597#
598# support for memory compaction
599config COMPACTION
600 bool "Allow for memory compaction"
603 depends on COMPACTION && MEMORY_BALLOON
604 help
605 Memory fragmentation introduced by ballooning might reduce
606 significantly the number of 2MB contiguous memory blocks that can be
607 used within a guest, thus imposing performance penalties associated
608 with the reduced number of transparent huge pages that could be used
609 by the guest workload. Allowing the compaction & migration for memory
610 pages enlisted as being part of memory balloon devices avoids the
611 scenario aforementioned and helps improving memory defragmentation.
612
613#
614# support for memory compaction
615config COMPACTION
616 bool "Allow for memory compaction"
601 def_bool y
617 default y
602 select MIGRATION
603 depends on MMU
604 help
605 Compaction is the only memory management component to form
606 high order (larger physically contiguous) memory blocks
607 reliably. The page allocator relies on compaction heavily and
608 the lack of the feature can lead to unexpected OOM killer
609 invocations for high order memory requests. You shouldn't

--- 6 unchanged lines hidden (view full) ---

616 depends on COMPACTION
617 default 0 if PREEMPT_RT
618 default 1
619
620#
621# support for free page reporting
622config PAGE_REPORTING
623 bool "Free page reporting"
618 select MIGRATION
619 depends on MMU
620 help
621 Compaction is the only memory management component to form
622 high order (larger physically contiguous) memory blocks
623 reliably. The page allocator relies on compaction heavily and
624 the lack of the feature can lead to unexpected OOM killer
625 invocations for high order memory requests. You shouldn't

--- 6 unchanged lines hidden (view full) ---

632 depends on COMPACTION
633 default 0 if PREEMPT_RT
634 default 1
635
636#
637# support for free page reporting
638config PAGE_REPORTING
639 bool "Free page reporting"
624 def_bool n
625 help
626 Free page reporting allows for the incremental acquisition of
627 free pages from the buddy allocator for the purpose of reporting
628 those pages to another entity, such as a hypervisor, so that the
629 memory can be freed within the host for other uses.
630
631#
632# support for page migration
633#
634config MIGRATION
635 bool "Page migration"
640 help
641 Free page reporting allows for the incremental acquisition of
642 free pages from the buddy allocator for the purpose of reporting
643 those pages to another entity, such as a hypervisor, so that the
644 memory can be freed within the host for other uses.
645
646#
647# support for page migration
648#
649config MIGRATION
650 bool "Page migration"
636 def_bool y
651 default y
637 depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
638 help
639 Allows the migration of the physical location of pages of processes
640 while the virtual addresses are not changed. This is useful in
641 two situations. The first is on NUMA systems to put pages nearer
642 to the processors accessing. The second is when allocating huge
643 pages as migration can relocate pages to satisfy a huge page
644 allocation instead of reclaiming.

--- 235 unchanged lines hidden (view full) ---

880 subsystems to allocate big physically-contiguous blocks of memory.
881 CMA reserves a region of memory and allows only movable pages to
882 be allocated from it. This way, the kernel can use the memory for
883 pagecache and when a subsystem requests for contiguous area, the
884 allocated pages are migrated away to serve the contiguous request.
885
886 If unsure, say "n".
887
652 depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
653 help
654 Allows the migration of the physical location of pages of processes
655 while the virtual addresses are not changed. This is useful in
656 two situations. The first is on NUMA systems to put pages nearer
657 to the processors accessing. The second is when allocating huge
658 pages as migration can relocate pages to satisfy a huge page
659 allocation instead of reclaiming.

--- 235 unchanged lines hidden (view full) ---

895 subsystems to allocate big physically-contiguous blocks of memory.
896 CMA reserves a region of memory and allows only movable pages to
897 be allocated from it. This way, the kernel can use the memory for
898 pagecache and when a subsystem requests for contiguous area, the
899 allocated pages are migrated away to serve the contiguous request.
900
901 If unsure, say "n".
902
903config CMA_DEBUG
904 bool "CMA debug messages (DEVELOPMENT)"
905 depends on DEBUG_KERNEL && CMA
906 help
907 Turns on debug messages in CMA. This produces KERN_DEBUG
908 messages for every CMA call as well as various messages while
909 processing calls such as dma_alloc_from_contiguous().
910 This option does not affect warning and error messages.
911
888config CMA_DEBUGFS
889 bool "CMA debugfs interface"
890 depends on CMA && DEBUG_FS
891 help
892 Turns on the DebugFS interface for CMA.
893
894config CMA_SYSFS
895 bool "CMA information through sysfs interface"
896 depends on CMA && SYSFS
897 help
898 This option exposes some sysfs attributes to get information
899 from CMA.
900
901config CMA_AREAS
902 int "Maximum count of the CMA areas"
903 depends on CMA
912config CMA_DEBUGFS
913 bool "CMA debugfs interface"
914 depends on CMA && DEBUG_FS
915 help
916 Turns on the DebugFS interface for CMA.
917
918config CMA_SYSFS
919 bool "CMA information through sysfs interface"
920 depends on CMA && SYSFS
921 help
922 This option exposes some sysfs attributes to get information
923 from CMA.
924
925config CMA_AREAS
926 int "Maximum count of the CMA areas"
927 depends on CMA
904 default 20 if NUMA
905 default 8
928 default 19 if NUMA
929 default 7
906 help
907 CMA allows to create CMA areas for particular purpose, mainly,
908 used as device private area. This parameter sets the maximum
909 number of CMA area in the system.
910
930 help
931 CMA allows to create CMA areas for particular purpose, mainly,
932 used as device private area. This parameter sets the maximum
933 number of CMA area in the system.
934
911 If unsure, leave the default value "8" in UMA and "20" in NUMA.
935 If unsure, leave the default value "7" in UMA and "19" in NUMA.
912
913config MEM_SOFT_DIRTY
914 bool "Track memory changes"
915 depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
916 select PROC_PAGE_MONITOR
917 help
918 This option enables memory changes tracking by introducing a
919 soft-dirty bit on pte-s. This bit it set when someone writes

--- 48 unchanged lines hidden (view full) ---

968 This feature allows to estimate the amount of user pages that have
969 not been touched during a given period of time. This information can
970 be useful to tune memory cgroup limits and/or for job placement
971 within a compute cluster.
972
973 See Documentation/admin-guide/mm/idle_page_tracking.rst for
974 more details.
975
936
937config MEM_SOFT_DIRTY
938 bool "Track memory changes"
939 depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
940 select PROC_PAGE_MONITOR
941 help
942 This option enables memory changes tracking by introducing a
943 soft-dirty bit on pte-s. This bit it set when someone writes

--- 48 unchanged lines hidden (view full) ---

992 This feature allows to estimate the amount of user pages that have
993 not been touched during a given period of time. This information can
994 be useful to tune memory cgroup limits and/or for job placement
995 within a compute cluster.
996
997 See Documentation/admin-guide/mm/idle_page_tracking.rst for
998 more details.
999
976# Architectures which implement cpu_dcache_is_aliasing() to query
977# whether the data caches are aliased (VIVT or VIPT with dcache
978# aliasing) need to select this.
979config ARCH_HAS_CPU_CACHE_ALIASING
980 bool
981
982config ARCH_HAS_CACHE_LINE_SIZE
983 bool
984
985config ARCH_HAS_CURRENT_STACK_POINTER
986 bool
987 help
988 In support of HARDENED_USERCOPY performing stack variable lifetime
989 checking, an architecture-agnostic way to find the stack pointer

--- 258 unchanged lines hidden ---
1000config ARCH_HAS_CACHE_LINE_SIZE
1001 bool
1002
1003config ARCH_HAS_CURRENT_STACK_POINTER
1004 bool
1005 help
1006 In support of HARDENED_USERCOPY performing stack variable lifetime
1007 checking, an architecture-agnostic way to find the stack pointer

--- 258 unchanged lines hidden ---