ksm: fix deadlock with munlock in exit_mmap
[firefly-linux-kernel-4.4.55.git] / mm / Kconfig
index 3aa519f52e18141e48cdf18db2c76e708df13dae..c0b6afa178a17df2644e80fe3c549c5bc4dcb006 100644 (file)
@@ -214,6 +214,17 @@ config HAVE_MLOCKED_PAGE_BIT
 config MMU_NOTIFIER
        bool
 
+config KSM
+       bool "Enable KSM for page merging"
+       depends on MMU
+       help
+         Enable Kernel Samepage Merging: KSM periodically scans those areas
+         of an application's address space that an app has advised may be
+         mergeable.  When it finds pages of identical content, it replaces
+         the many instances by a single resident page with that content, so
+         saving memory until one or another app needs to modify the content.
+         Recommended for use with KVM, or with other duplicative applications.
+
 config DEFAULT_MMAP_MIN_ADDR
         int "Low address space to protect from user allocation"
         default 4096