From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763266AbdEXLU5 (ORCPT ); Wed, 24 May 2017 07:20:57 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36314 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757826AbdEXLUS (ORCPT ); Wed, 24 May 2017 07:20:18 -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 03/10] mm: Add a range parameter to the vm_fault structure Date: Wed, 24 May 2017 13:19:54 +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-0020-0000-0000-00000373307C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17052411-0021-0000-0000-000041DE6ADE Message-Id: <1495624801-8063-4-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 When handling a page fault, it happens that the mmap_sem is released during the processing. As moving to range lock requires to pass the range parameter to the lock/unlock operation, this patch add a pointer to the range structure used when locking the mmap_sem to vm_fault structure. Signed-off-by: Laurent Dufour --- include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 7cb17c6b97de..4ad96294c180 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -344,6 +344,9 @@ struct vm_fault { * page table to avoid allocation from * atomic context. */ +#ifdef CONFIG_MEM_RANGE_LOCK + struct range_lock *lockrange; /* Range lock interval */ +#endif }; /* page entry size for vm->huge_fault() */ -- 2.7.4