From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933381AbdEXLUi (ORCPT ); Wed, 24 May 2017 07:20:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43512 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760241AbdEXLUe (ORCPT ); Wed, 24 May 2017 07:20:34 -0400 From: Laurent Dufour To: linux-mm@kvack.org Cc: Davidlohr Bueso , akpm@linux-foundation.org, Jan Kara , "Kirill A . Shutemov" , Michal Hocko , Peter Zijlstra , Mel Gorman , Andi Kleen , haren@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Subject: [RFC v2 10/10] mm: Introduce CONFIG_MEM_RANGE_LOCK Date: Wed, 24 May 2017 13:20:01 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495624801-8063-1-git-send-email-ldufour@linux.vnet.ibm.com> References: <1495624801-8063-1-git-send-email-ldufour@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17052411-0040-0000-0000-000003B56A24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17052411-0041-0000-0000-000020413776 Message-Id: <1495624801-8063-11-git-send-email-ldufour@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-24_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705240054 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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