Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763873AbdDSNqB (ORCPT ); Wed, 19 Apr 2017 09:46:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41161 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1763838AbdDSNp7 (ORCPT ); Wed, 19 Apr 2017 09:45:59 -0400 Subject: Re: [RFC 2/4] Deactivate mmap_sem assert To: Peter Zijlstra References: <582009a3f9459de3d8def1e76db46e815ea6153c.1492595897.git.ldufour@linux.vnet.ibm.com> <20170419123051.GA5730@worktop> Cc: linux-mm@kvack.org, Davidlohr Bueso , akpm@linux-foundation.org, Jan Kara , "Kirill A . Shutemov" , Michal Hocko , Mel Gorman , haren@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, Paul.McKenney@us.ibm.com, linux-kernel@vger.kernel.org From: Laurent Dufour Date: Wed, 19 Apr 2017 15:45:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170419123051.GA5730@worktop> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17041913-0020-0000-0000-0000034AA98D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041913-0021-0000-0000-000041581BEC Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-19_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704190120 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 618 Lines: 16 On 19/04/2017 14:30, Peter Zijlstra wrote: > On Wed, Apr 19, 2017 at 02:18:25PM +0200, Laurent Dufour wrote: >> When mmap_sem will be moved to a range lock, some assertion done in >> the code are no more valid, like the one ensuring mmap_sem is held. >> > > Why are they no longer valid? I didn't explain that very well.. When using a range lock we can't check that the lock is simply held, but if the range we are interesting on is locked or not. As I mentioned this patch will have to be reverted / reviewed once the range lock is providing dedicated APIs, but some check might be difficult to adapt to a range.