summaryrefslogtreecommitdiff
path: root/mm/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'mm/Kconfig')
-rw-r--r--mm/Kconfig112
1 files changed, 102 insertions, 10 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index 0e26f4fc8717..bd0ea5454af8 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -695,15 +695,6 @@ config PCP_BATCH_SCALE_MAX
config PHYS_ADDR_T_64BIT
def_bool 64BIT
-config BOUNCE
- bool "Enable bounce buffers"
- default y
- depends on BLOCK && MMU && HIGHMEM
- help
- Enable bounce buffers for devices that cannot access the full range of
- memory available to the CPU. Enabled by default when HIGHMEM is
- selected, but you may say n to override this.
-
config MMU_NOTIFIER
bool
select INTERVAL_TREE
@@ -749,7 +740,7 @@ config MEMORY_FAILURE
depends on MMU
depends on ARCH_SUPPORTS_MEMORY_FAILURE
bool "Enable recovery from hardware memory errors"
- select RAS
+ select INTERVAL_TREE
help
Enables code to recover from some memory failures on systems
with MCA recovery. This allows a system to continue running
@@ -862,6 +853,97 @@ choice
enabled at runtime via sysfs.
endchoice
+choice
+ prompt "Shmem hugepage allocation defaults"
+ depends on TRANSPARENT_HUGEPAGE
+ default TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER
+ help
+ Selects the hugepage allocation policy defaults for
+ the internal shmem mount.
+
+ The selection made here can be overridden by using the kernel
+ command line 'transparent_hugepage_shmem=' option.
+
+ config TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER
+ bool "never"
+ help
+ Disable hugepage allocation for shmem mount by default. It can
+ still be enabled with the kernel command line
+ 'transparent_hugepage_shmem=' option or at runtime via sysfs
+ knob. Note that madvise(MADV_COLLAPSE) can still cause
+ transparent huge pages to be obtained even if this mode is
+ specified.
+
+ config TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS
+ bool "always"
+ help
+ Always attempt to allocate hugepage for shmem mount, can
+ increase the memory footprint of applications without a
+ guaranteed benefit but it will work automatically for all
+ applications.
+
+ config TRANSPARENT_HUGEPAGE_SHMEM_HUGE_WITHIN_SIZE
+ bool "within_size"
+ help
+ Enable hugepage allocation for shmem mount if the allocation
+ will be fully within the i_size. This configuration also takes
+ into account any madvise(MADV_HUGEPAGE) hints that may be
+ provided by the applications.
+
+ config TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ADVISE
+ bool "advise"
+ help
+ Enable hugepage allocation for the shmem mount exclusively when
+ applications supply the madvise(MADV_HUGEPAGE) hint.
+ This ensures that hugepages are used only in response to explicit
+ requests from applications.
+endchoice
+
+choice
+ prompt "Tmpfs hugepage allocation defaults"
+ depends on TRANSPARENT_HUGEPAGE
+ default TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER
+ help
+ Selects the hugepage allocation policy defaults for
+ the tmpfs mount.
+
+ The selection made here can be overridden by using the kernel
+ command line 'transparent_hugepage_tmpfs=' option.
+
+ config TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER
+ bool "never"
+ help
+ Disable hugepage allocation for tmpfs mount by default. It can
+ still be enabled with the kernel command line
+ 'transparent_hugepage_tmpfs=' option. Note that
+ madvise(MADV_COLLAPSE) can still cause transparent huge pages
+ to be obtained even if this mode is specified.
+
+ config TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ALWAYS
+ bool "always"
+ help
+ Always attempt to allocate hugepage for tmpfs mount, can
+ increase the memory footprint of applications without a
+ guaranteed benefit but it will work automatically for all
+ applications.
+
+ config TRANSPARENT_HUGEPAGE_TMPFS_HUGE_WITHIN_SIZE
+ bool "within_size"
+ help
+ Enable hugepage allocation for tmpfs mount if the allocation
+ will be fully within the i_size. This configuration also takes
+ into account any madvise(MADV_HUGEPAGE) hints that may be
+ provided by the applications.
+
+ config TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ADVISE
+ bool "advise"
+ help
+ Enable hugepage allocation for the tmpfs mount exclusively when
+ applications supply the madvise(MADV_HUGEPAGE) hint.
+ This ensures that hugepages are used only in response to explicit
+ requests from applications.
+endchoice
+
config THP_SWAP
def_bool y
depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP && 64BIT
@@ -908,6 +990,16 @@ config PAGE_MAPCOUNT
config PGTABLE_HAS_HUGE_LEAVES
def_bool TRANSPARENT_HUGEPAGE || HUGETLB_PAGE
+#
+# We can end up creating gigantic folio.
+#
+config HAVE_GIGANTIC_FOLIOS
+ def_bool (HUGETLB_PAGE && ARCH_HAS_GIGANTIC_PAGE) || \
+ (ZONE_DEVICE && HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD)
+
+config ASYNC_KERNEL_PGTABLE_FREE
+ def_bool n
+
# TODO: Allow to be enabled without THP
config ARCH_SUPPORTS_HUGE_PFNMAP
def_bool n