[RFC v2 10/10] mm: Introduce CONFIG_MEM_RANGE_LOCK

Laurent Dufour
2017-05-24T11:20:38Z

A new configuration variable is introduced to activate the use of
range lock instead of semaphore to protect per process memory layout.

This range lock is replacing the use of a semaphore for mmap_sem.

Currently only available for X86_64 and PPC64 architectures.

By default this option is turned off and requires the EXPERT mode
since it is not yet complete.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
mm/Kconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/mm/Kconfig b/mm/Kconfig
index beb7a455915d..955d9a735a49 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -309,6 +309,18 @@ config NEED_BOUNCE_POOL
bool
default y if TILE && USB_OHCI_HCD

+config MEM_RANGE_LOCK
+ bool "Use range lock for process's memory layout"
+ default n
+ depends on EXPERT
+ depends on MMU
+ depends on X86_64 || PPC64
+ help
+ Use range lock instead of traditional semaphore to protect per
+ process memory layout. This is required when dealing with massive
+ threaded process on very large system (more than 80 cpu threads).
+ If unsure say n.
+
config NR_QUICK
int
depends on QUICKLIST
--
2.7.4