diff options
Diffstat (limited to 'mm/Kconfig')
| -rw-r--r-- | mm/Kconfig | 301 | 
1 files changed, 292 insertions, 9 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index c2c8a4a1189..3e9977a9d65 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1,6 +1,6 @@  config SELECT_MEMORY_MODEL  	def_bool y -	depends on EXPERIMENTAL || ARCH_SELECT_MEMORY_MODEL +	depends on ARCH_SELECT_MEMORY_MODEL  choice  	prompt "Memory model" @@ -20,7 +20,7 @@ config FLATMEM_MANUAL  	  Some users of more advanced features like NUMA and  	  memory hotplug may have different options here. -	  DISCONTIGMEM is an more mature, better tested system, +	  DISCONTIGMEM is a more mature, better tested system,  	  but is incompatible with memory hotplug and may suffer  	  decreased performance over SPARSEMEM.  If unsure between  	  "Sparse Memory" and "Discontiguous Memory", choose @@ -131,11 +131,59 @@ config SPARSEMEM_VMEMMAP  config HAVE_MEMBLOCK  	boolean +config HAVE_MEMBLOCK_NODE_MAP +	boolean + +config HAVE_MEMBLOCK_PHYS_MAP +	boolean + +config ARCH_DISCARD_MEMBLOCK +	boolean + +config NO_BOOTMEM +	boolean + +config MEMORY_ISOLATION +	boolean + +config MOVABLE_NODE +	boolean "Enable to assign a node which has only movable memory" +	depends on HAVE_MEMBLOCK +	depends on NO_BOOTMEM +	depends on X86_64 +	depends on NUMA +	default n +	help +	  Allow a node to have only movable memory.  Pages used by the kernel, +	  such as direct mapping pages cannot be migrated.  So the corresponding +	  memory device cannot be hotplugged.  This option allows the following +	  two things: +	  - When the system is booting, node full of hotpluggable memory can +	  be arranged to have only movable memory so that the whole node can +	  be hot-removed. (need movable_node boot option specified). +	  - After the system is up, the option allows users to online all the +	  memory of a node as movable memory so that the whole node can be +	  hot-removed. + +	  Users who don't use the memory hotplug feature are fine with this +	  option on since they don't specify movable_node boot option or they +	  don't online memory as movable. + +	  Say Y here if you want to hotplug a whole node. +	  Say N here if you want kernel to use memory on all nodes evenly. + +# +# Only be set on architectures that have completely implemented memory hotplug +# feature. If you are not sure, don't touch it. +# +config HAVE_BOOTMEM_INFO_NODE +	def_bool n +  # eventually, we can have this option just 'select SPARSEMEM'  config MEMORY_HOTPLUG  	bool "Allow for memory hot-add"  	depends on SPARSEMEM || X86_64_ACPI_NUMA -	depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG +	depends on ARCH_ENABLE_MEMORY_HOTPLUG  	depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390)  config MEMORY_HOTPLUG_SPARSE @@ -144,6 +192,8 @@ config MEMORY_HOTPLUG_SPARSE  config MEMORY_HOTREMOVE  	bool "Allow for memory hot remove" +	select MEMORY_ISOLATION +	select HAVE_BOOTMEM_INFO_NODE if (X86_64 || PPC64)  	depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE  	depends on MIGRATION @@ -169,17 +219,36 @@ config PAGEFLAGS_EXTENDED  #  config SPLIT_PTLOCK_CPUS  	int +	default "999999" if !MMU  	default "999999" if ARM && !CPU_CACHE_VIPT  	default "999999" if PARISC && !PA20 -	default "999999" if DEBUG_SPINLOCK || DEBUG_LOCK_ALLOC  	default "4" +config ARCH_ENABLE_SPLIT_PMD_PTLOCK +	boolean + +# +# support for memory balloon compaction +config BALLOON_COMPACTION +	bool "Allow for balloon memory compaction/migration" +	def_bool y +	depends on COMPACTION && VIRTIO_BALLOON +	help +	  Memory fragmentation introduced by ballooning might reduce +	  significantly the number of 2MB contiguous memory blocks that can be +	  used within a guest, thus imposing performance penalties associated +	  with the reduced number of transparent huge pages that could be used +	  by the guest workload. Allowing the compaction & migration for memory +	  pages enlisted as being part of memory balloon devices avoids the +	  scenario aforementioned and helps improving memory defragmentation. +  #  # support for memory compaction  config COMPACTION  	bool "Allow for memory compaction" +	def_bool y  	select MIGRATION -	depends on EXPERIMENTAL && HUGETLB_PAGE && MMU +	depends on MMU  	help  	  Allows the compaction of memory for the allocation of huge pages. @@ -189,7 +258,7 @@ config COMPACTION  config MIGRATION  	bool "Page migration"  	def_bool y -	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION +	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU  	help  	  Allows the migration of the physical location of pages of processes  	  while the virtual addresses are not changed. This is useful in @@ -198,6 +267,9 @@ config MIGRATION  	  pages as migration can relocate pages to satisfy a huge page  	  allocation instead of reclaiming. +config ARCH_ENABLE_HUGEPAGE_MIGRATION +	boolean +  config PHYS_ADDR_T_64BIT  	def_bool 64BIT || ARCH_PHYS_ADDR_T_64BIT @@ -207,8 +279,27 @@ config ZONE_DMA_FLAG  	default "1"  config BOUNCE -	def_bool y +	bool "Enable bounce buffers" +	default y  	depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM) +	help +	  Enable bounce buffers for devices that cannot access +	  the full range of memory available to the CPU. Enabled +	  by default when ZONE_DMA or HIGHMEM is selected, but you +	  may say n to override this. + +# On the 'tile' arch, USB OHCI needs the bounce pool since tilegx will often +# have more than 4GB of memory, but we don't currently use the IOTLB to present +# a 32-bit address to OHCI.  So we need to use a bounce pool instead. +# +# We also use the bounce pool to provide stable page writes for jbd.  jbd +# initiates buffer writeback without locking the page or setting PG_writeback, +# and fixing that behavior (a second time; jbd2 doesn't have this problem) is +# a major rework effort.  Instead, use the bounce buffer to snapshot pages +# (until jbd goes away).  The only jbd user is ext3. +config NEED_BOUNCE_POOL +	bool +	default y if (TILE && USB_OHCI_HCD) || (BLK_DEV_INTEGRITY && JBD)  config NR_QUICK  	int @@ -217,8 +308,12 @@ config NR_QUICK  	default "1"  config VIRT_TO_BUS -	def_bool y -	depends on !ARCH_NO_VIRT_TO_BUS +	bool +	help +	  An architecture should select this if it implements the +	  deprecated interface virt_to_bus().  All new architectures +	  should probably not select this. +  config MMU_NOTIFIER  	bool @@ -263,6 +358,7 @@ config MEMORY_FAILURE  	depends on MMU  	depends on ARCH_SUPPORTS_MEMORY_FAILURE  	bool "Enable recovery from hardware memory errors" +	select MEMORY_ISOLATION  	help  	  Enables code to recover from some memory failures on systems  	  with MCA recovery. This allows a system to continue running @@ -302,6 +398,44 @@ config NOMMU_INITIAL_TRIM_EXCESS  	  See Documentation/nommu-mmap.txt for more information. +config TRANSPARENT_HUGEPAGE +	bool "Transparent Hugepage Support" +	depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE +	select COMPACTION +	help +	  Transparent Hugepages allows the kernel to use huge pages and +	  huge tlb transparently to the applications whenever possible. +	  This feature can improve computing performance to certain +	  applications by speeding up page faults during memory +	  allocation, by reducing the number of tlb misses and by speeding +	  up the pagetable walking. + +	  If memory constrained on embedded, you may want to say N. + +choice +	prompt "Transparent Hugepage Support sysfs defaults" +	depends on TRANSPARENT_HUGEPAGE +	default TRANSPARENT_HUGEPAGE_ALWAYS +	help +	  Selects the sysfs defaults for Transparent Hugepage Support. + +	config TRANSPARENT_HUGEPAGE_ALWAYS +		bool "always" +	help +	  Enabling Transparent Hugepage always, can increase the +	  memory footprint of applications without a guaranteed +	  benefit but it will work automatically for all applications. + +	config TRANSPARENT_HUGEPAGE_MADVISE +		bool "madvise" +	help +	  Enabling Transparent Hugepage madvise, will only provide a +	  performance improvement benefit to the applications using +	  madvise(MADV_HUGEPAGE) but it won't risk to increase the +	  memory footprint of applications without a guaranteed +	  benefit. +endchoice +  #  # UP and nommu archs use km based percpu allocator  # @@ -309,3 +443,152 @@ config NEED_PER_CPU_KM  	depends on !SMP  	bool  	default y + +config CLEANCACHE +	bool "Enable cleancache driver to cache clean pages if tmem is present" +	default n +	help +	  Cleancache can be thought of as a page-granularity victim cache +	  for clean pages that the kernel's pageframe replacement algorithm +	  (PFRA) would like to keep around, but can't since there isn't enough +	  memory.  So when the PFRA "evicts" a page, it first attempts to use +	  cleancache code to put the data contained in that page into +	  "transcendent memory", memory that is not directly accessible or +	  addressable by the kernel and is of unknown and possibly +	  time-varying size.  And when a cleancache-enabled +	  filesystem wishes to access a page in a file on disk, it first +	  checks cleancache to see if it already contains it; if it does, +	  the page is copied into the kernel and a disk access is avoided. +	  When a transcendent memory driver is available (such as zcache or +	  Xen transcendent memory), a significant I/O reduction +	  may be achieved.  When none is available, all cleancache calls +	  are reduced to a single pointer-compare-against-NULL resulting +	  in a negligible performance hit. + +	  If unsure, say Y to enable cleancache + +config FRONTSWAP +	bool "Enable frontswap to cache swap pages if tmem is present" +	depends on SWAP +	default n +	help +	  Frontswap is so named because it can be thought of as the opposite +	  of a "backing" store for a swap device.  The data is stored into +	  "transcendent memory", memory that is not directly accessible or +	  addressable by the kernel and is of unknown and possibly +	  time-varying size.  When space in transcendent memory is available, +	  a significant swap I/O reduction may be achieved.  When none is +	  available, all frontswap calls are reduced to a single pointer- +	  compare-against-NULL resulting in a negligible performance hit +	  and swap data is stored as normal on the matching swap device. + +	  If unsure, say Y to enable frontswap. + +config CMA +	bool "Contiguous Memory Allocator" +	depends on HAVE_MEMBLOCK && MMU +	select MIGRATION +	select MEMORY_ISOLATION +	help +	  This enables the Contiguous Memory Allocator which allows other +	  subsystems to allocate big physically-contiguous blocks of memory. +	  CMA reserves a region of memory and allows only movable pages to +	  be allocated from it. This way, the kernel can use the memory for +	  pagecache and when a subsystem requests for contiguous area, the +	  allocated pages are migrated away to serve the contiguous request. + +	  If unsure, say "n". + +config CMA_DEBUG +	bool "CMA debug messages (DEVELOPMENT)" +	depends on DEBUG_KERNEL && CMA +	help +	  Turns on debug messages in CMA.  This produces KERN_DEBUG +	  messages for every CMA call as well as various messages while +	  processing calls such as dma_alloc_from_contiguous(). +	  This option does not affect warning and error messages. + +config ZBUD +	tristate +	default n +	help +	  A special purpose allocator for storing compressed pages. +	  It is designed to store up to two compressed pages per physical +	  page.  While this design limits storage density, it has simple and +	  deterministic reclaim properties that make it preferable to a higher +	  density approach when reclaim will be used. + +config ZSWAP +	bool "Compressed cache for swap pages (EXPERIMENTAL)" +	depends on FRONTSWAP && CRYPTO=y +	select CRYPTO_LZO +	select ZBUD +	default n +	help +	  A lightweight compressed cache for swap pages.  It takes +	  pages that are in the process of being swapped out and attempts to +	  compress them into a dynamically allocated RAM-based memory pool. +	  This can result in a significant I/O reduction on swap device and, +	  in the case where decompressing from RAM is faster that swap device +	  reads, can also improve workload performance. + +	  This is marked experimental because it is a new feature (as of +	  v3.11) that interacts heavily with memory reclaim.  While these +	  interactions don't cause any known issues on simple memory setups, +	  they have not be fully explored on the large set of potential +	  configurations and workloads that exist. + +config MEM_SOFT_DIRTY +	bool "Track memory changes" +	depends on CHECKPOINT_RESTORE && HAVE_ARCH_SOFT_DIRTY && PROC_FS +	select PROC_PAGE_MONITOR +	help +	  This option enables memory changes tracking by introducing a +	  soft-dirty bit on pte-s. This bit it set when someone writes +	  into a page just as regular dirty bit, but unlike the latter +	  it can be cleared by hands. + +	  See Documentation/vm/soft-dirty.txt for more details. + +config ZSMALLOC +	tristate "Memory allocator for compressed pages" +	depends on MMU +	default n +	help +	  zsmalloc is a slab-based memory allocator designed to store +	  compressed RAM pages.  zsmalloc uses virtual memory mapping +	  in order to reduce fragmentation.  However, this results in a +	  non-standard allocator interface where a handle, not a pointer, is +	  returned by an alloc().  This handle must be mapped in order to +	  access the allocated space. + +config PGTABLE_MAPPING +	bool "Use page table mapping to access object in zsmalloc" +	depends on ZSMALLOC +	help +	  By default, zsmalloc uses a copy-based object mapping method to +	  access allocations that span two pages. However, if a particular +	  architecture (ex, ARM) performs VM mapping faster than copying, +	  then you should select this. This causes zsmalloc to use page table +	  mapping rather than copying for object mapping. + +	  You can check speed with zsmalloc benchmark: +	  https://github.com/spartacus06/zsmapbench + +config GENERIC_EARLY_IOREMAP +	bool + +config MAX_STACK_SIZE_MB +	int "Maximum user stack size for 32-bit processes (MB)" +	default 80 +	range 8 256 if METAG +	range 8 2048 +	depends on STACK_GROWSUP && (!64BIT || COMPAT) +	help +	  This is the maximum stack size in Megabytes in the VM layout of 32-bit +	  user processes when the stack grows upwards (currently only on parisc +	  and metag arch). The stack will be located at the highest memory +	  address minus the given value, unless the RLIMIT_STACK hard limit is +	  changed to a smaller value in which case that is used. + +	  A sane initial value is 80 MB.  | 
