18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_cimenu "Memory Management options"
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciconfig SELECT_MEMORY_MODEL
68c2ecf20Sopenharmony_ci	def_bool y
78c2ecf20Sopenharmony_ci	depends on ARCH_SELECT_MEMORY_MODEL
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cichoice
108c2ecf20Sopenharmony_ci	prompt "Memory model"
118c2ecf20Sopenharmony_ci	depends on SELECT_MEMORY_MODEL
128c2ecf20Sopenharmony_ci	default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT
138c2ecf20Sopenharmony_ci	default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT
148c2ecf20Sopenharmony_ci	default FLATMEM_MANUAL
158c2ecf20Sopenharmony_ci	help
168c2ecf20Sopenharmony_ci	  This option allows you to change some of the ways that
178c2ecf20Sopenharmony_ci	  Linux manages its memory internally. Most users will
188c2ecf20Sopenharmony_ci	  only have one option here selected by the architecture
198c2ecf20Sopenharmony_ci	  configuration. This is normal.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciconfig FLATMEM_MANUAL
228c2ecf20Sopenharmony_ci	bool "Flat Memory"
238c2ecf20Sopenharmony_ci	depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || ARCH_FLATMEM_ENABLE
248c2ecf20Sopenharmony_ci	help
258c2ecf20Sopenharmony_ci	  This option is best suited for non-NUMA systems with
268c2ecf20Sopenharmony_ci	  flat address space. The FLATMEM is the most efficient
278c2ecf20Sopenharmony_ci	  system in terms of performance and resource consumption
288c2ecf20Sopenharmony_ci	  and it is the best option for smaller systems.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci	  For systems that have holes in their physical address
318c2ecf20Sopenharmony_ci	  spaces and for features like NUMA and memory hotplug,
328c2ecf20Sopenharmony_ci	  choose "Sparse Memory".
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci	  If unsure, choose this option (Flat Memory) over any other.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciconfig DISCONTIGMEM_MANUAL
378c2ecf20Sopenharmony_ci	bool "Discontiguous Memory"
388c2ecf20Sopenharmony_ci	depends on ARCH_DISCONTIGMEM_ENABLE
398c2ecf20Sopenharmony_ci	help
408c2ecf20Sopenharmony_ci	  This option provides enhanced support for discontiguous
418c2ecf20Sopenharmony_ci	  memory systems, over FLATMEM.  These systems have holes
428c2ecf20Sopenharmony_ci	  in their physical address spaces, and this option provides
438c2ecf20Sopenharmony_ci	  more efficient handling of these holes.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	  Although "Discontiguous Memory" is still used by several
468c2ecf20Sopenharmony_ci	  architectures, it is considered deprecated in favor of
478c2ecf20Sopenharmony_ci	  "Sparse Memory".
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci	  If unsure, choose "Sparse Memory" over this option.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciconfig SPARSEMEM_MANUAL
528c2ecf20Sopenharmony_ci	bool "Sparse Memory"
538c2ecf20Sopenharmony_ci	depends on ARCH_SPARSEMEM_ENABLE
548c2ecf20Sopenharmony_ci	help
558c2ecf20Sopenharmony_ci	  This will be the only option for some systems, including
568c2ecf20Sopenharmony_ci	  memory hot-plug systems.  This is normal.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	  This option provides efficient support for systems with
598c2ecf20Sopenharmony_ci	  holes is their physical address space and allows memory
608c2ecf20Sopenharmony_ci	  hot-plug and hot-remove.
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci	  If unsure, choose "Flat Memory" over this option.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciendchoice
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ciconfig MEMORY_MONITOR
678c2ecf20Sopenharmony_ci	bool "ENABLE MEMORY_MONITOR"
688c2ecf20Sopenharmony_ci	depends on PROC_FS
698c2ecf20Sopenharmony_ci	default n
708c2ecf20Sopenharmony_ci	help
718c2ecf20Sopenharmony_ci		MEMORY_MONITOR is a monitor of some memory reclaim method.
728c2ecf20Sopenharmony_ci		Now, kswapd wake up monitor use it.
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciconfig HYPERHOLD_FILE_LRU
758c2ecf20Sopenharmony_ci	bool "Enable HyperHold FILE LRU"
768c2ecf20Sopenharmony_ci	depends on HYPERHOLD && MEMCG
778c2ecf20Sopenharmony_ci	select HYPERHOLD_MEMCG
788c2ecf20Sopenharmony_ci	default n
798c2ecf20Sopenharmony_ci	help
808c2ecf20Sopenharmony_ci	  File-LRU is a mechanism that put file page in global lru list,
818c2ecf20Sopenharmony_ci	  and anon page in memcg lru list(if MEMCG is enable), what's
828c2ecf20Sopenharmony_ci	  more, recliam of anonymous pages and file page are separated.
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ciconfig HYPERHOLD_MEMCG
858c2ecf20Sopenharmony_ci	bool "Enable Memcg Management in HyperHold"
868c2ecf20Sopenharmony_ci	depends on HYPERHOLD && MEMCG
878c2ecf20Sopenharmony_ci	help
888c2ecf20Sopenharmony_ci	  Add more attributes in memory cgroup, these attribute is used
898c2ecf20Sopenharmony_ci	  to show information, shrink memory, swapin page and so on.
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ciconfig HYPERHOLD_ZSWAPD
928c2ecf20Sopenharmony_ci	bool "Enable zswapd thread to reclaim anon pages in background"
938c2ecf20Sopenharmony_ci	depends on HYPERHOLD && ZRAM
948c2ecf20Sopenharmony_ci	default n
958c2ecf20Sopenharmony_ci	help
968c2ecf20Sopenharmony_ci	  zswapd is a kernel thread that reclaim anonymous pages in the
978c2ecf20Sopenharmony_ci	  background. When the use of swap pages reaches the watermark
988c2ecf20Sopenharmony_ci	  and the refault of anonymous pages is high, the content of
998c2ecf20Sopenharmony_ci	  zram will exchanged to eswap by a certain percentage.
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ciconfig PAGE_TRACING
1028c2ecf20Sopenharmony_ci	bool "Enable Page Tracing"
1038c2ecf20Sopenharmony_ci	default n
1048c2ecf20Sopenharmony_ci	help
1058c2ecf20Sopenharmony_ci	  This option enables page tracing.
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ciconfig RECLAIM_ACCT
1088c2ecf20Sopenharmony_ci	bool "Memory reclaim delay accounting"
1098c2ecf20Sopenharmony_ci	default n
1108c2ecf20Sopenharmony_ci	help
1118c2ecf20Sopenharmony_ci	  Memory reclaim delay accounting. Never use it as a kernel module.
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciconfig DISCONTIGMEM
1148c2ecf20Sopenharmony_ci	def_bool y
1158c2ecf20Sopenharmony_ci	depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ciconfig SPARSEMEM
1188c2ecf20Sopenharmony_ci	def_bool y
1198c2ecf20Sopenharmony_ci	depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ciconfig FLATMEM
1228c2ecf20Sopenharmony_ci	def_bool y
1238c2ecf20Sopenharmony_ci	depends on (!DISCONTIGMEM && !SPARSEMEM) || FLATMEM_MANUAL
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ciconfig FLAT_NODE_MEM_MAP
1268c2ecf20Sopenharmony_ci	def_bool y
1278c2ecf20Sopenharmony_ci	depends on !SPARSEMEM
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci#
1308c2ecf20Sopenharmony_ci# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
1318c2ecf20Sopenharmony_ci# to represent different areas of memory.  This variable allows
1328c2ecf20Sopenharmony_ci# those dependencies to exist individually.
1338c2ecf20Sopenharmony_ci#
1348c2ecf20Sopenharmony_ciconfig NEED_MULTIPLE_NODES
1358c2ecf20Sopenharmony_ci	def_bool y
1368c2ecf20Sopenharmony_ci	depends on DISCONTIGMEM || NUMA
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci#
1398c2ecf20Sopenharmony_ci# SPARSEMEM_EXTREME (which is the default) does some bootmem
1408c2ecf20Sopenharmony_ci# allocations when sparse_init() is called.  If this cannot
1418c2ecf20Sopenharmony_ci# be done on your architecture, select this option.  However,
1428c2ecf20Sopenharmony_ci# statically allocating the mem_section[] array can potentially
1438c2ecf20Sopenharmony_ci# consume vast quantities of .bss, so be careful.
1448c2ecf20Sopenharmony_ci#
1458c2ecf20Sopenharmony_ci# This option will also potentially produce smaller runtime code
1468c2ecf20Sopenharmony_ci# with gcc 3.4 and later.
1478c2ecf20Sopenharmony_ci#
1488c2ecf20Sopenharmony_ciconfig SPARSEMEM_STATIC
1498c2ecf20Sopenharmony_ci	bool
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci#
1528c2ecf20Sopenharmony_ci# Architecture platforms which require a two level mem_section in SPARSEMEM
1538c2ecf20Sopenharmony_ci# must select this option. This is usually for architecture platforms with
1548c2ecf20Sopenharmony_ci# an extremely sparse physical address space.
1558c2ecf20Sopenharmony_ci#
1568c2ecf20Sopenharmony_ciconfig SPARSEMEM_EXTREME
1578c2ecf20Sopenharmony_ci	def_bool y
1588c2ecf20Sopenharmony_ci	depends on SPARSEMEM && !SPARSEMEM_STATIC
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ciconfig SPARSEMEM_VMEMMAP_ENABLE
1618c2ecf20Sopenharmony_ci	bool
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ciconfig SPARSEMEM_VMEMMAP
1648c2ecf20Sopenharmony_ci	bool "Sparse Memory virtual memmap"
1658c2ecf20Sopenharmony_ci	depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE
1668c2ecf20Sopenharmony_ci	default y
1678c2ecf20Sopenharmony_ci	help
1688c2ecf20Sopenharmony_ci	  SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
1698c2ecf20Sopenharmony_ci	  pfn_to_page and page_to_pfn operations.  This is the most
1708c2ecf20Sopenharmony_ci	  efficient option when sufficient kernel resources are available.
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ciconfig HAVE_MEMBLOCK_PHYS_MAP
1738c2ecf20Sopenharmony_ci	bool
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ciconfig HAVE_FAST_GUP
1768c2ecf20Sopenharmony_ci	depends on MMU
1778c2ecf20Sopenharmony_ci	bool
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ciconfig HOLES_IN_ZONE
1808c2ecf20Sopenharmony_ci	bool
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ci# Don't discard allocated memory used to track "memory" and "reserved" memblocks
1838c2ecf20Sopenharmony_ci# after early boot, so it can still be used to test for validity of memory.
1848c2ecf20Sopenharmony_ci# Also, memblocks are updated with memory hot(un)plug.
1858c2ecf20Sopenharmony_ciconfig ARCH_KEEP_MEMBLOCK
1868c2ecf20Sopenharmony_ci	bool
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci# Keep arch NUMA mapping infrastructure post-init.
1898c2ecf20Sopenharmony_ciconfig NUMA_KEEP_MEMINFO
1908c2ecf20Sopenharmony_ci	bool
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ciconfig MEMORY_ISOLATION
1938c2ecf20Sopenharmony_ci	bool
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci#
1968c2ecf20Sopenharmony_ci# Only be set on architectures that have completely implemented memory hotplug
1978c2ecf20Sopenharmony_ci# feature. If you are not sure, don't touch it.
1988c2ecf20Sopenharmony_ci#
1998c2ecf20Sopenharmony_ciconfig HAVE_BOOTMEM_INFO_NODE
2008c2ecf20Sopenharmony_ci	def_bool n
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci# eventually, we can have this option just 'select SPARSEMEM'
2038c2ecf20Sopenharmony_ciconfig MEMORY_HOTPLUG
2048c2ecf20Sopenharmony_ci	bool "Allow for memory hot-add"
2058c2ecf20Sopenharmony_ci	select MEMORY_ISOLATION
2068c2ecf20Sopenharmony_ci	depends on SPARSEMEM || X86_64_ACPI_NUMA
2078c2ecf20Sopenharmony_ci	depends on ARCH_ENABLE_MEMORY_HOTPLUG
2088c2ecf20Sopenharmony_ci	depends on 64BIT || BROKEN
2098c2ecf20Sopenharmony_ci	select NUMA_KEEP_MEMINFO if NUMA
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ciconfig MEMORY_HOTPLUG_SPARSE
2128c2ecf20Sopenharmony_ci	def_bool y
2138c2ecf20Sopenharmony_ci	depends on SPARSEMEM && MEMORY_HOTPLUG
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ciconfig MEMORY_HOTPLUG_DEFAULT_ONLINE
2168c2ecf20Sopenharmony_ci	bool "Online the newly added memory blocks by default"
2178c2ecf20Sopenharmony_ci	depends on MEMORY_HOTPLUG
2188c2ecf20Sopenharmony_ci	help
2198c2ecf20Sopenharmony_ci	  This option sets the default policy setting for memory hotplug
2208c2ecf20Sopenharmony_ci	  onlining policy (/sys/devices/system/memory/auto_online_blocks) which
2218c2ecf20Sopenharmony_ci	  determines what happens to newly added memory regions. Policy setting
2228c2ecf20Sopenharmony_ci	  can always be changed at runtime.
2238c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci	  Say Y here if you want all hot-plugged memory blocks to appear in
2268c2ecf20Sopenharmony_ci	  'online' state by default.
2278c2ecf20Sopenharmony_ci	  Say N here if you want the default policy to keep all hot-plugged
2288c2ecf20Sopenharmony_ci	  memory blocks in 'offline' state.
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_ciconfig MEMORY_HOTREMOVE
2318c2ecf20Sopenharmony_ci	bool "Allow for memory hot remove"
2328c2ecf20Sopenharmony_ci	select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)
2338c2ecf20Sopenharmony_ci	depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE
2348c2ecf20Sopenharmony_ci	depends on MIGRATION
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci# Heavily threaded applications may benefit from splitting the mm-wide
2378c2ecf20Sopenharmony_ci# page_table_lock, so that faults on different parts of the user address
2388c2ecf20Sopenharmony_ci# space can be handled with less contention: split it at this NR_CPUS.
2398c2ecf20Sopenharmony_ci# Default to 4 for wider testing, though 8 might be more appropriate.
2408c2ecf20Sopenharmony_ci# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock.
2418c2ecf20Sopenharmony_ci# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes.
2428c2ecf20Sopenharmony_ci# SPARC32 allocates multiple pte tables within a single page, and therefore
2438c2ecf20Sopenharmony_ci# a per-page lock leads to problems when multiple tables need to be locked
2448c2ecf20Sopenharmony_ci# at the same time (e.g. copy_page_range()).
2458c2ecf20Sopenharmony_ci# DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC spinlock_t also enlarge struct page.
2468c2ecf20Sopenharmony_ci#
2478c2ecf20Sopenharmony_ciconfig SPLIT_PTLOCK_CPUS
2488c2ecf20Sopenharmony_ci	int
2498c2ecf20Sopenharmony_ci	default "999999" if !MMU
2508c2ecf20Sopenharmony_ci	default "999999" if ARM && !CPU_CACHE_VIPT
2518c2ecf20Sopenharmony_ci	default "999999" if PARISC && !PA20
2528c2ecf20Sopenharmony_ci	default "999999" if SPARC32
2538c2ecf20Sopenharmony_ci	default "4"
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ciconfig ARCH_ENABLE_SPLIT_PMD_PTLOCK
2568c2ecf20Sopenharmony_ci	bool
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci#
2598c2ecf20Sopenharmony_ci# support for memory balloon
2608c2ecf20Sopenharmony_ciconfig MEMORY_BALLOON
2618c2ecf20Sopenharmony_ci	bool
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_ci#
2648c2ecf20Sopenharmony_ci# support for memory balloon compaction
2658c2ecf20Sopenharmony_ciconfig BALLOON_COMPACTION
2668c2ecf20Sopenharmony_ci	bool "Allow for balloon memory compaction/migration"
2678c2ecf20Sopenharmony_ci	def_bool y
2688c2ecf20Sopenharmony_ci	depends on COMPACTION && MEMORY_BALLOON
2698c2ecf20Sopenharmony_ci	help
2708c2ecf20Sopenharmony_ci	  Memory fragmentation introduced by ballooning might reduce
2718c2ecf20Sopenharmony_ci	  significantly the number of 2MB contiguous memory blocks that can be
2728c2ecf20Sopenharmony_ci	  used within a guest, thus imposing performance penalties associated
2738c2ecf20Sopenharmony_ci	  with the reduced number of transparent huge pages that could be used
2748c2ecf20Sopenharmony_ci	  by the guest workload. Allowing the compaction & migration for memory
2758c2ecf20Sopenharmony_ci	  pages enlisted as being part of memory balloon devices avoids the
2768c2ecf20Sopenharmony_ci	  scenario aforementioned and helps improving memory defragmentation.
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci#
2798c2ecf20Sopenharmony_ci# support for memory compaction
2808c2ecf20Sopenharmony_ciconfig COMPACTION
2818c2ecf20Sopenharmony_ci	bool "Allow for memory compaction"
2828c2ecf20Sopenharmony_ci	def_bool y
2838c2ecf20Sopenharmony_ci	select MIGRATION
2848c2ecf20Sopenharmony_ci	depends on MMU
2858c2ecf20Sopenharmony_ci	help
2868c2ecf20Sopenharmony_ci	  Compaction is the only memory management component to form
2878c2ecf20Sopenharmony_ci	  high order (larger physically contiguous) memory blocks
2888c2ecf20Sopenharmony_ci	  reliably. The page allocator relies on compaction heavily and
2898c2ecf20Sopenharmony_ci	  the lack of the feature can lead to unexpected OOM killer
2908c2ecf20Sopenharmony_ci	  invocations for high order memory requests. You shouldn't
2918c2ecf20Sopenharmony_ci	  disable this option unless there really is a strong reason for
2928c2ecf20Sopenharmony_ci	  it and then we would be really interested to hear about that at
2938c2ecf20Sopenharmony_ci	  linux-mm@kvack.org.
2948c2ecf20Sopenharmony_ci
2958c2ecf20Sopenharmony_ci#
2968c2ecf20Sopenharmony_ci# support for free page reporting
2978c2ecf20Sopenharmony_ciconfig PAGE_REPORTING
2988c2ecf20Sopenharmony_ci	bool "Free page reporting"
2998c2ecf20Sopenharmony_ci	def_bool n
3008c2ecf20Sopenharmony_ci	help
3018c2ecf20Sopenharmony_ci	  Free page reporting allows for the incremental acquisition of
3028c2ecf20Sopenharmony_ci	  free pages from the buddy allocator for the purpose of reporting
3038c2ecf20Sopenharmony_ci	  those pages to another entity, such as a hypervisor, so that the
3048c2ecf20Sopenharmony_ci	  memory can be freed within the host for other uses.
3058c2ecf20Sopenharmony_ci
3068c2ecf20Sopenharmony_ci#
3078c2ecf20Sopenharmony_ci# support for page migration
3088c2ecf20Sopenharmony_ci#
3098c2ecf20Sopenharmony_ciconfig MIGRATION
3108c2ecf20Sopenharmony_ci	bool "Page migration"
3118c2ecf20Sopenharmony_ci	def_bool y
3128c2ecf20Sopenharmony_ci	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
3138c2ecf20Sopenharmony_ci	help
3148c2ecf20Sopenharmony_ci	  Allows the migration of the physical location of pages of processes
3158c2ecf20Sopenharmony_ci	  while the virtual addresses are not changed. This is useful in
3168c2ecf20Sopenharmony_ci	  two situations. The first is on NUMA systems to put pages nearer
3178c2ecf20Sopenharmony_ci	  to the processors accessing. The second is when allocating huge
3188c2ecf20Sopenharmony_ci	  pages as migration can relocate pages to satisfy a huge page
3198c2ecf20Sopenharmony_ci	  allocation instead of reclaiming.
3208c2ecf20Sopenharmony_ci
3218c2ecf20Sopenharmony_ciconfig ARCH_ENABLE_HUGEPAGE_MIGRATION
3228c2ecf20Sopenharmony_ci	bool
3238c2ecf20Sopenharmony_ci
3248c2ecf20Sopenharmony_ciconfig ARCH_ENABLE_THP_MIGRATION
3258c2ecf20Sopenharmony_ci	bool
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_ciconfig CONTIG_ALLOC
3288c2ecf20Sopenharmony_ci	def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
3298c2ecf20Sopenharmony_ci
3308c2ecf20Sopenharmony_ciconfig PHYS_ADDR_T_64BIT
3318c2ecf20Sopenharmony_ci	def_bool 64BIT
3328c2ecf20Sopenharmony_ci
3338c2ecf20Sopenharmony_ciconfig BOUNCE
3348c2ecf20Sopenharmony_ci	bool "Enable bounce buffers"
3358c2ecf20Sopenharmony_ci	default y
3368c2ecf20Sopenharmony_ci	depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
3378c2ecf20Sopenharmony_ci	help
3388c2ecf20Sopenharmony_ci	  Enable bounce buffers for devices that cannot access
3398c2ecf20Sopenharmony_ci	  the full range of memory available to the CPU. Enabled
3408c2ecf20Sopenharmony_ci	  by default when ZONE_DMA or HIGHMEM is selected, but you
3418c2ecf20Sopenharmony_ci	  may say n to override this.
3428c2ecf20Sopenharmony_ci
3438c2ecf20Sopenharmony_ciconfig VIRT_TO_BUS
3448c2ecf20Sopenharmony_ci	bool
3458c2ecf20Sopenharmony_ci	help
3468c2ecf20Sopenharmony_ci	  An architecture should select this if it implements the
3478c2ecf20Sopenharmony_ci	  deprecated interface virt_to_bus().  All new architectures
3488c2ecf20Sopenharmony_ci	  should probably not select this.
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_ciconfig MMU_NOTIFIER
3528c2ecf20Sopenharmony_ci	bool
3538c2ecf20Sopenharmony_ci	select SRCU
3548c2ecf20Sopenharmony_ci	select INTERVAL_TREE
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_ciconfig KSM
3578c2ecf20Sopenharmony_ci	bool "Enable KSM for page merging"
3588c2ecf20Sopenharmony_ci	depends on MMU
3598c2ecf20Sopenharmony_ci	select XXHASH
3608c2ecf20Sopenharmony_ci	help
3618c2ecf20Sopenharmony_ci	  Enable Kernel Samepage Merging: KSM periodically scans those areas
3628c2ecf20Sopenharmony_ci	  of an application's address space that an app has advised may be
3638c2ecf20Sopenharmony_ci	  mergeable.  When it finds pages of identical content, it replaces
3648c2ecf20Sopenharmony_ci	  the many instances by a single page with that content, so
3658c2ecf20Sopenharmony_ci	  saving memory until one or another app needs to modify the content.
3668c2ecf20Sopenharmony_ci	  Recommended for use with KVM, or with other duplicative applications.
3678c2ecf20Sopenharmony_ci	  See Documentation/vm/ksm.rst for more information: KSM is inactive
3688c2ecf20Sopenharmony_ci	  until a program has madvised that an area is MADV_MERGEABLE, and
3698c2ecf20Sopenharmony_ci	  root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_ciconfig DEFAULT_MMAP_MIN_ADDR
3728c2ecf20Sopenharmony_ci	int "Low address space to protect from user allocation"
3738c2ecf20Sopenharmony_ci	depends on MMU
3748c2ecf20Sopenharmony_ci	default 4096
3758c2ecf20Sopenharmony_ci	help
3768c2ecf20Sopenharmony_ci	  This is the portion of low virtual memory which should be protected
3778c2ecf20Sopenharmony_ci	  from userspace allocation.  Keeping a user from writing to low pages
3788c2ecf20Sopenharmony_ci	  can help reduce the impact of kernel NULL pointer bugs.
3798c2ecf20Sopenharmony_ci
3808c2ecf20Sopenharmony_ci	  For most ia64, ppc64 and x86 users with lots of address space
3818c2ecf20Sopenharmony_ci	  a value of 65536 is reasonable and should cause no problems.
3828c2ecf20Sopenharmony_ci	  On arm and other archs it should not be higher than 32768.
3838c2ecf20Sopenharmony_ci	  Programs which use vm86 functionality or have some need to map
3848c2ecf20Sopenharmony_ci	  this low address space will need CAP_SYS_RAWIO or disable this
3858c2ecf20Sopenharmony_ci	  protection by setting the value to 0.
3868c2ecf20Sopenharmony_ci
3878c2ecf20Sopenharmony_ci	  This value can be changed after boot using the
3888c2ecf20Sopenharmony_ci	  /proc/sys/vm/mmap_min_addr tunable.
3898c2ecf20Sopenharmony_ci
3908c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_MEMORY_FAILURE
3918c2ecf20Sopenharmony_ci	bool
3928c2ecf20Sopenharmony_ci
3938c2ecf20Sopenharmony_ciconfig MEMORY_FAILURE
3948c2ecf20Sopenharmony_ci	depends on MMU
3958c2ecf20Sopenharmony_ci	depends on ARCH_SUPPORTS_MEMORY_FAILURE
3968c2ecf20Sopenharmony_ci	bool "Enable recovery from hardware memory errors"
3978c2ecf20Sopenharmony_ci	select MEMORY_ISOLATION
3988c2ecf20Sopenharmony_ci	select RAS
3998c2ecf20Sopenharmony_ci	help
4008c2ecf20Sopenharmony_ci	  Enables code to recover from some memory failures on systems
4018c2ecf20Sopenharmony_ci	  with MCA recovery. This allows a system to continue running
4028c2ecf20Sopenharmony_ci	  even when some of its memory has uncorrected errors. This requires
4038c2ecf20Sopenharmony_ci	  special hardware support and typically ECC memory.
4048c2ecf20Sopenharmony_ci
4058c2ecf20Sopenharmony_ciconfig HWPOISON_INJECT
4068c2ecf20Sopenharmony_ci	tristate "HWPoison pages injector"
4078c2ecf20Sopenharmony_ci	depends on MEMORY_FAILURE && DEBUG_KERNEL && PROC_FS
4088c2ecf20Sopenharmony_ci	select PROC_PAGE_MONITOR
4098c2ecf20Sopenharmony_ci
4108c2ecf20Sopenharmony_ciconfig NOMMU_INITIAL_TRIM_EXCESS
4118c2ecf20Sopenharmony_ci	int "Turn on mmap() excess space trimming before booting"
4128c2ecf20Sopenharmony_ci	depends on !MMU
4138c2ecf20Sopenharmony_ci	default 1
4148c2ecf20Sopenharmony_ci	help
4158c2ecf20Sopenharmony_ci	  The NOMMU mmap() frequently needs to allocate large contiguous chunks
4168c2ecf20Sopenharmony_ci	  of memory on which to store mappings, but it can only ask the system
4178c2ecf20Sopenharmony_ci	  allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
4188c2ecf20Sopenharmony_ci	  more than it requires.  To deal with this, mmap() is able to trim off
4198c2ecf20Sopenharmony_ci	  the excess and return it to the allocator.
4208c2ecf20Sopenharmony_ci
4218c2ecf20Sopenharmony_ci	  If trimming is enabled, the excess is trimmed off and returned to the
4228c2ecf20Sopenharmony_ci	  system allocator, which can cause extra fragmentation, particularly
4238c2ecf20Sopenharmony_ci	  if there are a lot of transient processes.
4248c2ecf20Sopenharmony_ci
4258c2ecf20Sopenharmony_ci	  If trimming is disabled, the excess is kept, but not used, which for
4268c2ecf20Sopenharmony_ci	  long-term mappings means that the space is wasted.
4278c2ecf20Sopenharmony_ci
4288c2ecf20Sopenharmony_ci	  Trimming can be dynamically controlled through a sysctl option
4298c2ecf20Sopenharmony_ci	  (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of
4308c2ecf20Sopenharmony_ci	  excess pages there must be before trimming should occur, or zero if
4318c2ecf20Sopenharmony_ci	  no trimming is to occur.
4328c2ecf20Sopenharmony_ci
4338c2ecf20Sopenharmony_ci	  This option specifies the initial value of this option.  The default
4348c2ecf20Sopenharmony_ci	  of 1 says that all excess pages should be trimmed.
4358c2ecf20Sopenharmony_ci
4368c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
4378c2ecf20Sopenharmony_ci
4388c2ecf20Sopenharmony_ciconfig TRANSPARENT_HUGEPAGE
4398c2ecf20Sopenharmony_ci	bool "Transparent Hugepage Support"
4408c2ecf20Sopenharmony_ci	depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE
4418c2ecf20Sopenharmony_ci	select COMPACTION
4428c2ecf20Sopenharmony_ci	select XARRAY_MULTI
4438c2ecf20Sopenharmony_ci	help
4448c2ecf20Sopenharmony_ci	  Transparent Hugepages allows the kernel to use huge pages and
4458c2ecf20Sopenharmony_ci	  huge tlb transparently to the applications whenever possible.
4468c2ecf20Sopenharmony_ci	  This feature can improve computing performance to certain
4478c2ecf20Sopenharmony_ci	  applications by speeding up page faults during memory
4488c2ecf20Sopenharmony_ci	  allocation, by reducing the number of tlb misses and by speeding
4498c2ecf20Sopenharmony_ci	  up the pagetable walking.
4508c2ecf20Sopenharmony_ci
4518c2ecf20Sopenharmony_ci	  If memory constrained on embedded, you may want to say N.
4528c2ecf20Sopenharmony_ci
4538c2ecf20Sopenharmony_cichoice
4548c2ecf20Sopenharmony_ci	prompt "Transparent Hugepage Support sysfs defaults"
4558c2ecf20Sopenharmony_ci	depends on TRANSPARENT_HUGEPAGE
4568c2ecf20Sopenharmony_ci	default TRANSPARENT_HUGEPAGE_ALWAYS
4578c2ecf20Sopenharmony_ci	help
4588c2ecf20Sopenharmony_ci	  Selects the sysfs defaults for Transparent Hugepage Support.
4598c2ecf20Sopenharmony_ci
4608c2ecf20Sopenharmony_ci	config TRANSPARENT_HUGEPAGE_ALWAYS
4618c2ecf20Sopenharmony_ci		bool "always"
4628c2ecf20Sopenharmony_ci	help
4638c2ecf20Sopenharmony_ci	  Enabling Transparent Hugepage always, can increase the
4648c2ecf20Sopenharmony_ci	  memory footprint of applications without a guaranteed
4658c2ecf20Sopenharmony_ci	  benefit but it will work automatically for all applications.
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_ci	config TRANSPARENT_HUGEPAGE_MADVISE
4688c2ecf20Sopenharmony_ci		bool "madvise"
4698c2ecf20Sopenharmony_ci	help
4708c2ecf20Sopenharmony_ci	  Enabling Transparent Hugepage madvise, will only provide a
4718c2ecf20Sopenharmony_ci	  performance improvement benefit to the applications using
4728c2ecf20Sopenharmony_ci	  madvise(MADV_HUGEPAGE) but it won't risk to increase the
4738c2ecf20Sopenharmony_ci	  memory footprint of applications without a guaranteed
4748c2ecf20Sopenharmony_ci	  benefit.
4758c2ecf20Sopenharmony_ciendchoice
4768c2ecf20Sopenharmony_ci
4778c2ecf20Sopenharmony_ciconfig ARCH_WANTS_THP_SWAP
4788c2ecf20Sopenharmony_ci	def_bool n
4798c2ecf20Sopenharmony_ci
4808c2ecf20Sopenharmony_ciconfig THP_SWAP
4818c2ecf20Sopenharmony_ci	def_bool y
4828c2ecf20Sopenharmony_ci	depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP
4838c2ecf20Sopenharmony_ci	help
4848c2ecf20Sopenharmony_ci	  Swap transparent huge pages in one piece, without splitting.
4858c2ecf20Sopenharmony_ci	  XXX: For now, swap cluster backing transparent huge page
4868c2ecf20Sopenharmony_ci	  will be split after swapout.
4878c2ecf20Sopenharmony_ci
4888c2ecf20Sopenharmony_ci	  For selection by architectures with reasonable THP sizes.
4898c2ecf20Sopenharmony_ci
4908c2ecf20Sopenharmony_ci#
4918c2ecf20Sopenharmony_ci# UP and nommu archs use km based percpu allocator
4928c2ecf20Sopenharmony_ci#
4938c2ecf20Sopenharmony_ciconfig NEED_PER_CPU_KM
4948c2ecf20Sopenharmony_ci	depends on !SMP
4958c2ecf20Sopenharmony_ci	bool
4968c2ecf20Sopenharmony_ci	default y
4978c2ecf20Sopenharmony_ci
4988c2ecf20Sopenharmony_ciconfig CLEANCACHE
4998c2ecf20Sopenharmony_ci	bool "Enable cleancache driver to cache clean pages if tmem is present"
5008c2ecf20Sopenharmony_ci	help
5018c2ecf20Sopenharmony_ci	  Cleancache can be thought of as a page-granularity victim cache
5028c2ecf20Sopenharmony_ci	  for clean pages that the kernel's pageframe replacement algorithm
5038c2ecf20Sopenharmony_ci	  (PFRA) would like to keep around, but can't since there isn't enough
5048c2ecf20Sopenharmony_ci	  memory.  So when the PFRA "evicts" a page, it first attempts to use
5058c2ecf20Sopenharmony_ci	  cleancache code to put the data contained in that page into
5068c2ecf20Sopenharmony_ci	  "transcendent memory", memory that is not directly accessible or
5078c2ecf20Sopenharmony_ci	  addressable by the kernel and is of unknown and possibly
5088c2ecf20Sopenharmony_ci	  time-varying size.  And when a cleancache-enabled
5098c2ecf20Sopenharmony_ci	  filesystem wishes to access a page in a file on disk, it first
5108c2ecf20Sopenharmony_ci	  checks cleancache to see if it already contains it; if it does,
5118c2ecf20Sopenharmony_ci	  the page is copied into the kernel and a disk access is avoided.
5128c2ecf20Sopenharmony_ci	  When a transcendent memory driver is available (such as zcache or
5138c2ecf20Sopenharmony_ci	  Xen transcendent memory), a significant I/O reduction
5148c2ecf20Sopenharmony_ci	  may be achieved.  When none is available, all cleancache calls
5158c2ecf20Sopenharmony_ci	  are reduced to a single pointer-compare-against-NULL resulting
5168c2ecf20Sopenharmony_ci	  in a negligible performance hit.
5178c2ecf20Sopenharmony_ci
5188c2ecf20Sopenharmony_ci	  If unsure, say Y to enable cleancache
5198c2ecf20Sopenharmony_ci
5208c2ecf20Sopenharmony_ciconfig FRONTSWAP
5218c2ecf20Sopenharmony_ci	bool "Enable frontswap to cache swap pages if tmem is present"
5228c2ecf20Sopenharmony_ci	depends on SWAP
5238c2ecf20Sopenharmony_ci	help
5248c2ecf20Sopenharmony_ci	  Frontswap is so named because it can be thought of as the opposite
5258c2ecf20Sopenharmony_ci	  of a "backing" store for a swap device.  The data is stored into
5268c2ecf20Sopenharmony_ci	  "transcendent memory", memory that is not directly accessible or
5278c2ecf20Sopenharmony_ci	  addressable by the kernel and is of unknown and possibly
5288c2ecf20Sopenharmony_ci	  time-varying size.  When space in transcendent memory is available,
5298c2ecf20Sopenharmony_ci	  a significant swap I/O reduction may be achieved.  When none is
5308c2ecf20Sopenharmony_ci	  available, all frontswap calls are reduced to a single pointer-
5318c2ecf20Sopenharmony_ci	  compare-against-NULL resulting in a negligible performance hit
5328c2ecf20Sopenharmony_ci	  and swap data is stored as normal on the matching swap device.
5338c2ecf20Sopenharmony_ci
5348c2ecf20Sopenharmony_ci	  If unsure, say Y to enable frontswap.
5358c2ecf20Sopenharmony_ci
5368c2ecf20Sopenharmony_ciconfig CMA
5378c2ecf20Sopenharmony_ci	bool "Contiguous Memory Allocator"
5388c2ecf20Sopenharmony_ci	depends on MMU
5398c2ecf20Sopenharmony_ci	select MIGRATION
5408c2ecf20Sopenharmony_ci	select MEMORY_ISOLATION
5418c2ecf20Sopenharmony_ci	help
5428c2ecf20Sopenharmony_ci	  This enables the Contiguous Memory Allocator which allows other
5438c2ecf20Sopenharmony_ci	  subsystems to allocate big physically-contiguous blocks of memory.
5448c2ecf20Sopenharmony_ci	  CMA reserves a region of memory and allows only movable pages to
5458c2ecf20Sopenharmony_ci	  be allocated from it. This way, the kernel can use the memory for
5468c2ecf20Sopenharmony_ci	  pagecache and when a subsystem requests for contiguous area, the
5478c2ecf20Sopenharmony_ci	  allocated pages are migrated away to serve the contiguous request.
5488c2ecf20Sopenharmony_ci
5498c2ecf20Sopenharmony_ci	  If unsure, say "n".
5508c2ecf20Sopenharmony_ci
5518c2ecf20Sopenharmony_ciconfig CMA_DEBUG
5528c2ecf20Sopenharmony_ci	bool "CMA debug messages (DEVELOPMENT)"
5538c2ecf20Sopenharmony_ci	depends on DEBUG_KERNEL && CMA
5548c2ecf20Sopenharmony_ci	help
5558c2ecf20Sopenharmony_ci	  Turns on debug messages in CMA.  This produces KERN_DEBUG
5568c2ecf20Sopenharmony_ci	  messages for every CMA call as well as various messages while
5578c2ecf20Sopenharmony_ci	  processing calls such as dma_alloc_from_contiguous().
5588c2ecf20Sopenharmony_ci	  This option does not affect warning and error messages.
5598c2ecf20Sopenharmony_ci
5608c2ecf20Sopenharmony_ciconfig CMA_DEBUGFS
5618c2ecf20Sopenharmony_ci	bool "CMA debugfs interface"
5628c2ecf20Sopenharmony_ci	depends on CMA && DEBUG_FS
5638c2ecf20Sopenharmony_ci	help
5648c2ecf20Sopenharmony_ci	  Turns on the DebugFS interface for CMA.
5658c2ecf20Sopenharmony_ci
5668c2ecf20Sopenharmony_ciconfig CMA_AREAS
5678c2ecf20Sopenharmony_ci	int "Maximum count of the CMA areas"
5688c2ecf20Sopenharmony_ci	depends on CMA
5698c2ecf20Sopenharmony_ci	default 19 if NUMA
5708c2ecf20Sopenharmony_ci	default 7
5718c2ecf20Sopenharmony_ci	help
5728c2ecf20Sopenharmony_ci	  CMA allows to create CMA areas for particular purpose, mainly,
5738c2ecf20Sopenharmony_ci	  used as device private area. This parameter sets the maximum
5748c2ecf20Sopenharmony_ci	  number of CMA area in the system.
5758c2ecf20Sopenharmony_ci
5768c2ecf20Sopenharmony_ci	  If unsure, leave the default value "7" in UMA and "19" in NUMA.
5778c2ecf20Sopenharmony_ci
5788c2ecf20Sopenharmony_ciconfig CMA_REUSE
5798c2ecf20Sopenharmony_ci	bool "CMA reuse feature"
5808c2ecf20Sopenharmony_ci	depends on CMA
5818c2ecf20Sopenharmony_ci	help
5828c2ecf20Sopenharmony_ci	  If enabled, it will add MIGRATE_CMA to pcp lists and movable
5838c2ecf20Sopenharmony_ci	  allocations with __GFP_CMA flag will use cma areas prior to
5848c2ecf20Sopenharmony_ci	  movable areas.
5858c2ecf20Sopenharmony_ci
5868c2ecf20Sopenharmony_ci	  It improves the utilization ratio of cma areas.
5878c2ecf20Sopenharmony_ci
5888c2ecf20Sopenharmony_ciconfig MEM_SOFT_DIRTY
5898c2ecf20Sopenharmony_ci	bool "Track memory changes"
5908c2ecf20Sopenharmony_ci	depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS
5918c2ecf20Sopenharmony_ci	select PROC_PAGE_MONITOR
5928c2ecf20Sopenharmony_ci	help
5938c2ecf20Sopenharmony_ci	  This option enables memory changes tracking by introducing a
5948c2ecf20Sopenharmony_ci	  soft-dirty bit on pte-s. This bit it set when someone writes
5958c2ecf20Sopenharmony_ci	  into a page just as regular dirty bit, but unlike the latter
5968c2ecf20Sopenharmony_ci	  it can be cleared by hands.
5978c2ecf20Sopenharmony_ci
5988c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/mm/soft-dirty.rst for more details.
5998c2ecf20Sopenharmony_ci
6008c2ecf20Sopenharmony_ciconfig ZSWAP
6018c2ecf20Sopenharmony_ci	bool "Compressed cache for swap pages (EXPERIMENTAL)"
6028c2ecf20Sopenharmony_ci	depends on FRONTSWAP && CRYPTO=y
6038c2ecf20Sopenharmony_ci	select ZPOOL
6048c2ecf20Sopenharmony_ci	help
6058c2ecf20Sopenharmony_ci	  A lightweight compressed cache for swap pages.  It takes
6068c2ecf20Sopenharmony_ci	  pages that are in the process of being swapped out and attempts to
6078c2ecf20Sopenharmony_ci	  compress them into a dynamically allocated RAM-based memory pool.
6088c2ecf20Sopenharmony_ci	  This can result in a significant I/O reduction on swap device and,
6098c2ecf20Sopenharmony_ci	  in the case where decompressing from RAM is faster that swap device
6108c2ecf20Sopenharmony_ci	  reads, can also improve workload performance.
6118c2ecf20Sopenharmony_ci
6128c2ecf20Sopenharmony_ci	  This is marked experimental because it is a new feature (as of
6138c2ecf20Sopenharmony_ci	  v3.11) that interacts heavily with memory reclaim.  While these
6148c2ecf20Sopenharmony_ci	  interactions don't cause any known issues on simple memory setups,
6158c2ecf20Sopenharmony_ci	  they have not be fully explored on the large set of potential
6168c2ecf20Sopenharmony_ci	  configurations and workloads that exist.
6178c2ecf20Sopenharmony_ci
6188c2ecf20Sopenharmony_cichoice
6198c2ecf20Sopenharmony_ci	prompt "Compressed cache for swap pages default compressor"
6208c2ecf20Sopenharmony_ci	depends on ZSWAP
6218c2ecf20Sopenharmony_ci	default ZSWAP_COMPRESSOR_DEFAULT_LZO
6228c2ecf20Sopenharmony_ci	help
6238c2ecf20Sopenharmony_ci	  Selects the default compression algorithm for the compressed cache
6248c2ecf20Sopenharmony_ci	  for swap pages.
6258c2ecf20Sopenharmony_ci
6268c2ecf20Sopenharmony_ci	  For an overview what kind of performance can be expected from
6278c2ecf20Sopenharmony_ci	  a particular compression algorithm please refer to the benchmarks
6288c2ecf20Sopenharmony_ci	  available at the following LWN page:
6298c2ecf20Sopenharmony_ci	  https://lwn.net/Articles/751795/
6308c2ecf20Sopenharmony_ci
6318c2ecf20Sopenharmony_ci	  If in doubt, select 'LZO'.
6328c2ecf20Sopenharmony_ci
6338c2ecf20Sopenharmony_ci	  The selection made here can be overridden by using the kernel
6348c2ecf20Sopenharmony_ci	  command line 'zswap.compressor=' option.
6358c2ecf20Sopenharmony_ci
6368c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
6378c2ecf20Sopenharmony_ci	bool "Deflate"
6388c2ecf20Sopenharmony_ci	select CRYPTO_DEFLATE
6398c2ecf20Sopenharmony_ci	help
6408c2ecf20Sopenharmony_ci	  Use the Deflate algorithm as the default compression algorithm.
6418c2ecf20Sopenharmony_ci
6428c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_LZO
6438c2ecf20Sopenharmony_ci	bool "LZO"
6448c2ecf20Sopenharmony_ci	select CRYPTO_LZO
6458c2ecf20Sopenharmony_ci	help
6468c2ecf20Sopenharmony_ci	  Use the LZO algorithm as the default compression algorithm.
6478c2ecf20Sopenharmony_ci
6488c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_842
6498c2ecf20Sopenharmony_ci	bool "842"
6508c2ecf20Sopenharmony_ci	select CRYPTO_842
6518c2ecf20Sopenharmony_ci	help
6528c2ecf20Sopenharmony_ci	  Use the 842 algorithm as the default compression algorithm.
6538c2ecf20Sopenharmony_ci
6548c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4
6558c2ecf20Sopenharmony_ci	bool "LZ4"
6568c2ecf20Sopenharmony_ci	select CRYPTO_LZ4
6578c2ecf20Sopenharmony_ci	help
6588c2ecf20Sopenharmony_ci	  Use the LZ4 algorithm as the default compression algorithm.
6598c2ecf20Sopenharmony_ci
6608c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
6618c2ecf20Sopenharmony_ci	bool "LZ4HC"
6628c2ecf20Sopenharmony_ci	select CRYPTO_LZ4HC
6638c2ecf20Sopenharmony_ci	help
6648c2ecf20Sopenharmony_ci	  Use the LZ4HC algorithm as the default compression algorithm.
6658c2ecf20Sopenharmony_ci
6668c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT_ZSTD
6678c2ecf20Sopenharmony_ci	bool "zstd"
6688c2ecf20Sopenharmony_ci	select CRYPTO_ZSTD
6698c2ecf20Sopenharmony_ci	help
6708c2ecf20Sopenharmony_ci	  Use the zstd algorithm as the default compression algorithm.
6718c2ecf20Sopenharmony_ciendchoice
6728c2ecf20Sopenharmony_ci
6738c2ecf20Sopenharmony_ciconfig ZSWAP_COMPRESSOR_DEFAULT
6748c2ecf20Sopenharmony_ci       string
6758c2ecf20Sopenharmony_ci       depends on ZSWAP
6768c2ecf20Sopenharmony_ci       default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE
6778c2ecf20Sopenharmony_ci       default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO
6788c2ecf20Sopenharmony_ci       default "842" if ZSWAP_COMPRESSOR_DEFAULT_842
6798c2ecf20Sopenharmony_ci       default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4
6808c2ecf20Sopenharmony_ci       default "lz4hc" if ZSWAP_COMPRESSOR_DEFAULT_LZ4HC
6818c2ecf20Sopenharmony_ci       default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
6828c2ecf20Sopenharmony_ci       default ""
6838c2ecf20Sopenharmony_ci
6848c2ecf20Sopenharmony_cichoice
6858c2ecf20Sopenharmony_ci	prompt "Compressed cache for swap pages default allocator"
6868c2ecf20Sopenharmony_ci	depends on ZSWAP
6878c2ecf20Sopenharmony_ci	default ZSWAP_ZPOOL_DEFAULT_ZBUD
6888c2ecf20Sopenharmony_ci	help
6898c2ecf20Sopenharmony_ci	  Selects the default allocator for the compressed cache for
6908c2ecf20Sopenharmony_ci	  swap pages.
6918c2ecf20Sopenharmony_ci	  The default is 'zbud' for compatibility, however please do
6928c2ecf20Sopenharmony_ci	  read the description of each of the allocators below before
6938c2ecf20Sopenharmony_ci	  making a right choice.
6948c2ecf20Sopenharmony_ci
6958c2ecf20Sopenharmony_ci	  The selection made here can be overridden by using the kernel
6968c2ecf20Sopenharmony_ci	  command line 'zswap.zpool=' option.
6978c2ecf20Sopenharmony_ci
6988c2ecf20Sopenharmony_ciconfig ZSWAP_ZPOOL_DEFAULT_ZBUD
6998c2ecf20Sopenharmony_ci	bool "zbud"
7008c2ecf20Sopenharmony_ci	select ZBUD
7018c2ecf20Sopenharmony_ci	help
7028c2ecf20Sopenharmony_ci	  Use the zbud allocator as the default allocator.
7038c2ecf20Sopenharmony_ci
7048c2ecf20Sopenharmony_ciconfig ZSWAP_ZPOOL_DEFAULT_Z3FOLD
7058c2ecf20Sopenharmony_ci	bool "z3fold"
7068c2ecf20Sopenharmony_ci	select Z3FOLD
7078c2ecf20Sopenharmony_ci	help
7088c2ecf20Sopenharmony_ci	  Use the z3fold allocator as the default allocator.
7098c2ecf20Sopenharmony_ci
7108c2ecf20Sopenharmony_ciconfig ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
7118c2ecf20Sopenharmony_ci	bool "zsmalloc"
7128c2ecf20Sopenharmony_ci	select ZSMALLOC
7138c2ecf20Sopenharmony_ci	help
7148c2ecf20Sopenharmony_ci	  Use the zsmalloc allocator as the default allocator.
7158c2ecf20Sopenharmony_ciendchoice
7168c2ecf20Sopenharmony_ci
7178c2ecf20Sopenharmony_ciconfig ZSWAP_ZPOOL_DEFAULT
7188c2ecf20Sopenharmony_ci       string
7198c2ecf20Sopenharmony_ci       depends on ZSWAP
7208c2ecf20Sopenharmony_ci       default "zbud" if ZSWAP_ZPOOL_DEFAULT_ZBUD
7218c2ecf20Sopenharmony_ci       default "z3fold" if ZSWAP_ZPOOL_DEFAULT_Z3FOLD
7228c2ecf20Sopenharmony_ci       default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
7238c2ecf20Sopenharmony_ci       default ""
7248c2ecf20Sopenharmony_ci
7258c2ecf20Sopenharmony_ciconfig ZSWAP_DEFAULT_ON
7268c2ecf20Sopenharmony_ci	bool "Enable the compressed cache for swap pages by default"
7278c2ecf20Sopenharmony_ci	depends on ZSWAP
7288c2ecf20Sopenharmony_ci	help
7298c2ecf20Sopenharmony_ci	  If selected, the compressed cache for swap pages will be enabled
7308c2ecf20Sopenharmony_ci	  at boot, otherwise it will be disabled.
7318c2ecf20Sopenharmony_ci
7328c2ecf20Sopenharmony_ci	  The selection made here can be overridden by using the kernel
7338c2ecf20Sopenharmony_ci	  command line 'zswap.enabled=' option.
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_ciconfig ZPOOL
7368c2ecf20Sopenharmony_ci	tristate "Common API for compressed memory storage"
7378c2ecf20Sopenharmony_ci	help
7388c2ecf20Sopenharmony_ci	  Compressed memory storage API.  This allows using either zbud or
7398c2ecf20Sopenharmony_ci	  zsmalloc.
7408c2ecf20Sopenharmony_ci
7418c2ecf20Sopenharmony_ciconfig ZBUD
7428c2ecf20Sopenharmony_ci	tristate "Low (Up to 2x) density storage for compressed pages"
7438c2ecf20Sopenharmony_ci	help
7448c2ecf20Sopenharmony_ci	  A special purpose allocator for storing compressed pages.
7458c2ecf20Sopenharmony_ci	  It is designed to store up to two compressed pages per physical
7468c2ecf20Sopenharmony_ci	  page.  While this design limits storage density, it has simple and
7478c2ecf20Sopenharmony_ci	  deterministic reclaim properties that make it preferable to a higher
7488c2ecf20Sopenharmony_ci	  density approach when reclaim will be used.
7498c2ecf20Sopenharmony_ci
7508c2ecf20Sopenharmony_ciconfig Z3FOLD
7518c2ecf20Sopenharmony_ci	tristate "Up to 3x density storage for compressed pages"
7528c2ecf20Sopenharmony_ci	depends on ZPOOL
7538c2ecf20Sopenharmony_ci	help
7548c2ecf20Sopenharmony_ci	  A special purpose allocator for storing compressed pages.
7558c2ecf20Sopenharmony_ci	  It is designed to store up to three compressed pages per physical
7568c2ecf20Sopenharmony_ci	  page. It is a ZBUD derivative so the simplicity and determinism are
7578c2ecf20Sopenharmony_ci	  still there.
7588c2ecf20Sopenharmony_ci
7598c2ecf20Sopenharmony_ciconfig ZSMALLOC
7608c2ecf20Sopenharmony_ci	tristate "Memory allocator for compressed pages"
7618c2ecf20Sopenharmony_ci	depends on MMU
7628c2ecf20Sopenharmony_ci	help
7638c2ecf20Sopenharmony_ci	  zsmalloc is a slab-based memory allocator designed to store
7648c2ecf20Sopenharmony_ci	  compressed RAM pages.  zsmalloc uses virtual memory mapping
7658c2ecf20Sopenharmony_ci	  in order to reduce fragmentation.  However, this results in a
7668c2ecf20Sopenharmony_ci	  non-standard allocator interface where a handle, not a pointer, is
7678c2ecf20Sopenharmony_ci	  returned by an alloc().  This handle must be mapped in order to
7688c2ecf20Sopenharmony_ci	  access the allocated space.
7698c2ecf20Sopenharmony_ci
7708c2ecf20Sopenharmony_ciconfig ZSMALLOC_STAT
7718c2ecf20Sopenharmony_ci	bool "Export zsmalloc statistics"
7728c2ecf20Sopenharmony_ci	depends on ZSMALLOC
7738c2ecf20Sopenharmony_ci	select DEBUG_FS
7748c2ecf20Sopenharmony_ci	help
7758c2ecf20Sopenharmony_ci	  This option enables code in the zsmalloc to collect various
7768c2ecf20Sopenharmony_ci	  statistics about whats happening in zsmalloc and exports that
7778c2ecf20Sopenharmony_ci	  information to userspace via debugfs.
7788c2ecf20Sopenharmony_ci	  If unsure, say N.
7798c2ecf20Sopenharmony_ci
7808c2ecf20Sopenharmony_ciconfig GENERIC_EARLY_IOREMAP
7818c2ecf20Sopenharmony_ci	bool
7828c2ecf20Sopenharmony_ci
7838c2ecf20Sopenharmony_ciconfig MAX_STACK_SIZE_MB
7848c2ecf20Sopenharmony_ci	int "Maximum user stack size for 32-bit processes (MB)"
7858c2ecf20Sopenharmony_ci	default 80
7868c2ecf20Sopenharmony_ci	range 8 2048
7878c2ecf20Sopenharmony_ci	depends on STACK_GROWSUP && (!64BIT || COMPAT)
7888c2ecf20Sopenharmony_ci	help
7898c2ecf20Sopenharmony_ci	  This is the maximum stack size in Megabytes in the VM layout of 32-bit
7908c2ecf20Sopenharmony_ci	  user processes when the stack grows upwards (currently only on parisc
7918c2ecf20Sopenharmony_ci	  arch). The stack will be located at the highest memory address minus
7928c2ecf20Sopenharmony_ci	  the given value, unless the RLIMIT_STACK hard limit is changed to a
7938c2ecf20Sopenharmony_ci	  smaller value in which case that is used.
7948c2ecf20Sopenharmony_ci
7958c2ecf20Sopenharmony_ci	  A sane initial value is 80 MB.
7968c2ecf20Sopenharmony_ci
7978c2ecf20Sopenharmony_ciconfig DEFERRED_STRUCT_PAGE_INIT
7988c2ecf20Sopenharmony_ci	bool "Defer initialisation of struct pages to kthreads"
7998c2ecf20Sopenharmony_ci	depends on SPARSEMEM
8008c2ecf20Sopenharmony_ci	depends on !NEED_PER_CPU_KM
8018c2ecf20Sopenharmony_ci	depends on 64BIT
8028c2ecf20Sopenharmony_ci	select PADATA
8038c2ecf20Sopenharmony_ci	help
8048c2ecf20Sopenharmony_ci	  Ordinarily all struct pages are initialised during early boot in a
8058c2ecf20Sopenharmony_ci	  single thread. On very large machines this can take a considerable
8068c2ecf20Sopenharmony_ci	  amount of time. If this option is set, large machines will bring up
8078c2ecf20Sopenharmony_ci	  a subset of memmap at boot and then initialise the rest in parallel.
8088c2ecf20Sopenharmony_ci	  This has a potential performance impact on tasks running early in the
8098c2ecf20Sopenharmony_ci	  lifetime of the system until these kthreads finish the
8108c2ecf20Sopenharmony_ci	  initialisation.
8118c2ecf20Sopenharmony_ci
8128c2ecf20Sopenharmony_ciconfig IDLE_PAGE_TRACKING
8138c2ecf20Sopenharmony_ci	bool "Enable idle page tracking"
8148c2ecf20Sopenharmony_ci	depends on SYSFS && MMU
8158c2ecf20Sopenharmony_ci	select PAGE_EXTENSION if !64BIT
8168c2ecf20Sopenharmony_ci	help
8178c2ecf20Sopenharmony_ci	  This feature allows to estimate the amount of user pages that have
8188c2ecf20Sopenharmony_ci	  not been touched during a given period of time. This information can
8198c2ecf20Sopenharmony_ci	  be useful to tune memory cgroup limits and/or for job placement
8208c2ecf20Sopenharmony_ci	  within a compute cluster.
8218c2ecf20Sopenharmony_ci
8228c2ecf20Sopenharmony_ci	  See Documentation/admin-guide/mm/idle_page_tracking.rst for
8238c2ecf20Sopenharmony_ci	  more details.
8248c2ecf20Sopenharmony_ci
8258c2ecf20Sopenharmony_ciconfig ARCH_HAS_PTE_DEVMAP
8268c2ecf20Sopenharmony_ci	bool
8278c2ecf20Sopenharmony_ci
8288c2ecf20Sopenharmony_ciconfig ZONE_DEVICE
8298c2ecf20Sopenharmony_ci	bool "Device memory (pmem, HMM, etc...) hotplug support"
8308c2ecf20Sopenharmony_ci	depends on MEMORY_HOTPLUG
8318c2ecf20Sopenharmony_ci	depends on MEMORY_HOTREMOVE
8328c2ecf20Sopenharmony_ci	depends on SPARSEMEM_VMEMMAP
8338c2ecf20Sopenharmony_ci	depends on ARCH_HAS_PTE_DEVMAP
8348c2ecf20Sopenharmony_ci	select XARRAY_MULTI
8358c2ecf20Sopenharmony_ci
8368c2ecf20Sopenharmony_ci	help
8378c2ecf20Sopenharmony_ci	  Device memory hotplug support allows for establishing pmem,
8388c2ecf20Sopenharmony_ci	  or other device driver discovered memory regions, in the
8398c2ecf20Sopenharmony_ci	  memmap. This allows pfn_to_page() lookups of otherwise
8408c2ecf20Sopenharmony_ci	  "device-physical" addresses which is needed for using a DAX
8418c2ecf20Sopenharmony_ci	  mapping in an O_DIRECT operation, among other things.
8428c2ecf20Sopenharmony_ci
8438c2ecf20Sopenharmony_ci	  If FS_DAX is enabled, then say Y.
8448c2ecf20Sopenharmony_ci
8458c2ecf20Sopenharmony_ciconfig DEV_PAGEMAP_OPS
8468c2ecf20Sopenharmony_ci	bool
8478c2ecf20Sopenharmony_ci
8488c2ecf20Sopenharmony_ci#
8498c2ecf20Sopenharmony_ci# Helpers to mirror range of the CPU page tables of a process into device page
8508c2ecf20Sopenharmony_ci# tables.
8518c2ecf20Sopenharmony_ci#
8528c2ecf20Sopenharmony_ciconfig HMM_MIRROR
8538c2ecf20Sopenharmony_ci	bool
8548c2ecf20Sopenharmony_ci	depends on MMU
8558c2ecf20Sopenharmony_ci
8568c2ecf20Sopenharmony_ciconfig DEVICE_PRIVATE
8578c2ecf20Sopenharmony_ci	bool "Unaddressable device memory (GPU memory, ...)"
8588c2ecf20Sopenharmony_ci	depends on ZONE_DEVICE
8598c2ecf20Sopenharmony_ci	select DEV_PAGEMAP_OPS
8608c2ecf20Sopenharmony_ci
8618c2ecf20Sopenharmony_ci	help
8628c2ecf20Sopenharmony_ci	  Allows creation of struct pages to represent unaddressable device
8638c2ecf20Sopenharmony_ci	  memory; i.e., memory that is only accessible from the device (or
8648c2ecf20Sopenharmony_ci	  group of devices). You likely also want to select HMM_MIRROR.
8658c2ecf20Sopenharmony_ci
8668c2ecf20Sopenharmony_ciconfig VMAP_PFN
8678c2ecf20Sopenharmony_ci	bool
8688c2ecf20Sopenharmony_ci
8698c2ecf20Sopenharmony_ciconfig FRAME_VECTOR
8708c2ecf20Sopenharmony_ci	bool
8718c2ecf20Sopenharmony_ci
8728c2ecf20Sopenharmony_ciconfig ARCH_USES_HIGH_VMA_FLAGS
8738c2ecf20Sopenharmony_ci	bool
8748c2ecf20Sopenharmony_ciconfig ARCH_HAS_PKEYS
8758c2ecf20Sopenharmony_ci	bool
8768c2ecf20Sopenharmony_ci
8778c2ecf20Sopenharmony_ciconfig PERCPU_STATS
8788c2ecf20Sopenharmony_ci	bool "Collect percpu memory statistics"
8798c2ecf20Sopenharmony_ci	help
8808c2ecf20Sopenharmony_ci	  This feature collects and exposes statistics via debugfs. The
8818c2ecf20Sopenharmony_ci	  information includes global and per chunk statistics, which can
8828c2ecf20Sopenharmony_ci	  be used to help understand percpu memory usage.
8838c2ecf20Sopenharmony_ci
8848c2ecf20Sopenharmony_ciconfig GUP_BENCHMARK
8858c2ecf20Sopenharmony_ci	bool "Enable infrastructure for get_user_pages() and related calls benchmarking"
8868c2ecf20Sopenharmony_ci	help
8878c2ecf20Sopenharmony_ci	  Provides /sys/kernel/debug/gup_benchmark that helps with testing
8888c2ecf20Sopenharmony_ci	  performance of get_user_pages() and related calls.
8898c2ecf20Sopenharmony_ci
8908c2ecf20Sopenharmony_ci	  See tools/testing/selftests/vm/gup_benchmark.c
8918c2ecf20Sopenharmony_ci
8928c2ecf20Sopenharmony_ciconfig GUP_GET_PTE_LOW_HIGH
8938c2ecf20Sopenharmony_ci	bool
8948c2ecf20Sopenharmony_ci
8958c2ecf20Sopenharmony_ciconfig READ_ONLY_THP_FOR_FS
8968c2ecf20Sopenharmony_ci	bool "Read-only THP for filesystems (EXPERIMENTAL)"
8978c2ecf20Sopenharmony_ci	depends on TRANSPARENT_HUGEPAGE && SHMEM
8988c2ecf20Sopenharmony_ci
8998c2ecf20Sopenharmony_ci	help
9008c2ecf20Sopenharmony_ci	  Allow khugepaged to put read-only file-backed pages in THP.
9018c2ecf20Sopenharmony_ci
9028c2ecf20Sopenharmony_ci	  This is marked experimental because it is a new feature. Write
9038c2ecf20Sopenharmony_ci	  support of file THPs will be developed in the next few release
9048c2ecf20Sopenharmony_ci	  cycles.
9058c2ecf20Sopenharmony_ci
9068c2ecf20Sopenharmony_ciconfig ARCH_HAS_PTE_SPECIAL
9078c2ecf20Sopenharmony_ci	bool
9088c2ecf20Sopenharmony_ci
9098c2ecf20Sopenharmony_ci#
9108c2ecf20Sopenharmony_ci# Some architectures require a special hugepage directory format that is
9118c2ecf20Sopenharmony_ci# required to support multiple hugepage sizes. For example a4fe3ce76
9128c2ecf20Sopenharmony_ci# "powerpc/mm: Allow more flexible layouts for hugepage pagetables"
9138c2ecf20Sopenharmony_ci# introduced it on powerpc.  This allows for a more flexible hugepage
9148c2ecf20Sopenharmony_ci# pagetable layouts.
9158c2ecf20Sopenharmony_ci#
9168c2ecf20Sopenharmony_ciconfig ARCH_HAS_HUGEPD
9178c2ecf20Sopenharmony_ci	bool
9188c2ecf20Sopenharmony_ci
9198c2ecf20Sopenharmony_ciconfig MAPPING_DIRTY_HELPERS
9208c2ecf20Sopenharmony_ci        bool
9218c2ecf20Sopenharmony_ci
9228c2ecf20Sopenharmony_ciconfig ANON_VMA_NAME
9238c2ecf20Sopenharmony_ci	bool "Anonymous VMA name support"
9248c2ecf20Sopenharmony_ci	depends on PROC_FS && ADVISE_SYSCALLS && MMU
9258c2ecf20Sopenharmony_ci
9268c2ecf20Sopenharmony_ci	help
9278c2ecf20Sopenharmony_ci	  Allow naming anonymous virtual memory areas.
9288c2ecf20Sopenharmony_ci
9298c2ecf20Sopenharmony_ci	  This feature allows assigning names to virtual memory areas. Assigned
9308c2ecf20Sopenharmony_ci	  names can be later retrieved from /proc/pid/maps and /proc/pid/smaps
9318c2ecf20Sopenharmony_ci	  and help identifying individual anonymous memory areas.
9328c2ecf20Sopenharmony_ci	  Assigning a name to anonymous virtual memory area might prevent that
9338c2ecf20Sopenharmony_ci	  area from being merged with adjacent virtual memory areas due to the
9348c2ecf20Sopenharmony_ci	  difference in their name.
9358c2ecf20Sopenharmony_ci#
9368c2ecf20Sopenharmony_ci# For lmkd to trigger in-kernel lowmem info
9378c2ecf20Sopenharmony_ci#
9388c2ecf20Sopenharmony_ciconfig LOWMEM
9398c2ecf20Sopenharmony_ci        bool "Low Memory Killer"
9408c2ecf20Sopenharmony_ci	default n
9418c2ecf20Sopenharmony_ci	help
9428c2ecf20Sopenharmony_ci	  Enables lowmem killer parameter tuning
9438c2ecf20Sopenharmony_ci
9448c2ecf20Sopenharmony_ciconfig LMKD_DBG
9458c2ecf20Sopenharmony_ci	bool "Low Memory Killer Debug"
9468c2ecf20Sopenharmony_ci	default n
9478c2ecf20Sopenharmony_ci	help
9488c2ecf20Sopenharmony_ci	  print processes info when lmk happen per several seconds
9498c2ecf20Sopenharmony_ci#
9508c2ecf20Sopenharmony_ci# Show the process ashmem for debug
9518c2ecf20Sopenharmony_ci#
9528c2ecf20Sopenharmony_ciconfig MEMTRACE_ASHMEM
9538c2ecf20Sopenharmony_ci	bool "Ashmem Process Info Show"
9548c2ecf20Sopenharmony_ci	depends on ASHMEM
9558c2ecf20Sopenharmony_ci	default n
9568c2ecf20Sopenharmony_ci	help
9578c2ecf20Sopenharmony_ci	  Enable the Ashmem Process Info Show
9588c2ecf20Sopenharmony_ci
9598c2ecf20Sopenharmony_ci#
9608c2ecf20Sopenharmony_ci# Use rss_threshold to monitoring RSS
9618c2ecf20Sopenharmony_ci#
9628c2ecf20Sopenharmony_ciconfig RSS_THRESHOLD
9638c2ecf20Sopenharmony_ci	bool "Enable /proc/<pid>/rss and /proc/<pid>/rss_threshold to monitoring RSS"
9648c2ecf20Sopenharmony_ci	default n
9658c2ecf20Sopenharmony_ci	depends on PROC_FS && MEMCG
9668c2ecf20Sopenharmony_ci	help
9678c2ecf20Sopenharmony_ci	  Set a threshold to monitoring RSS in per pid
9688c2ecf20Sopenharmony_ci
9698c2ecf20Sopenharmony_ciconfig MEM_PURGEABLE
9708c2ecf20Sopenharmony_ci	bool "Purgeable memory feature"
9718c2ecf20Sopenharmony_ci	default n
9728c2ecf20Sopenharmony_ci	depends on 64BIT
9738c2ecf20Sopenharmony_ci	select ARCH_USES_HIGH_VMA_FLAGS
9748c2ecf20Sopenharmony_ci	help
9758c2ecf20Sopenharmony_ci	  Support purgeable pages for process
9768c2ecf20Sopenharmony_ci
9778c2ecf20Sopenharmony_ciconfig MEM_PURGEABLE_DEBUG
9788c2ecf20Sopenharmony_ci	bool "Purgeable memory debug"
9798c2ecf20Sopenharmony_ci	default n
9808c2ecf20Sopenharmony_ci	depends on MEM_PURGEABLE
9818c2ecf20Sopenharmony_ci	help
9828c2ecf20Sopenharmony_ci	  Debug info for purgeable memory
9838c2ecf20Sopenharmony_ci
9848c2ecf20Sopenharmony_ciconfig PURGEABLE_ASHMEM
9858c2ecf20Sopenharmony_ci	bool "Purgeable memory feature for ashmem"
9868c2ecf20Sopenharmony_ci	default n
9878c2ecf20Sopenharmony_ci	depends on MEM_PURGEABLE
9888c2ecf20Sopenharmony_ci	help
9898c2ecf20Sopenharmony_ci	  Support purgeable ashmem for process
9908c2ecf20Sopenharmony_ciendmenu
991