Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3547289yba; Tue, 23 Apr 2019 05:51:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl1SDZFxGkMAqRhXlP0WzFXaUG68BmhVY8kWMWGtNy/VpshG61Dd5SttinLgyoNZ2Mv7Z/ X-Received: by 2002:a62:1c87:: with SMTP id c129mr1804820pfc.113.1556023881759; Tue, 23 Apr 2019 05:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556023881; cv=none; d=google.com; s=arc-20160816; b=kh/6DP12PeaIq8IB9Erj9Y+oqwgCYJCBQXZ1we3tCHblFZmIzzNRssXqnjMJlMPZ/f jY3IDr5pk6xorM5p2qAgvQhJ6jH/5dJbPJOaxVQf1+mOAT77H4sPnbaCwbItf7lJKdwt C76F8kqYvYAdXRvshOnSSRn5urzK3faV7QXFP7VwSy5uhlUV2Uf0LSYbWnKMjnw0WAXc Tzw3/6g2x6RxS/6YuqDUoSuJDVTWQKG6QsUJhIiAg1+8YEw0jdaEpS75ZHSHPRJW6sKd j5v8pk6GXdzpW+AJVzezv6Q6Ez0NwkdJxQN2XGyfgh7gY9YZafLyD3tV2IOu9Hx+tmzB s4/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=35dsPaMjiCJMbp0smPFnBa37kyiFHneebblaSoEgPnQ=; b=rN0d8SBeq3uPdG7Lei7Xt1BQk+2gtfaCl3kJTTT8WxVIq3C3bcaZAfla1K3vIPr89a mF4qewnKIBX420pPeTrdjVOVmkGy0WWULrzquUzr+RhMOH6R4R+dlGLO9mmN4H4F1AWh K80kfNl2nxqoCcmkWLuwSwcJ55xQXQgnWrr4FqDBiifSr8ekFUm97vxvRbKgyOf/XGDd RzZ4qBff3MJOeWBOWMoh8lQdcLekxyKFN4qWSIoxROJAw3RQd3Q9ULwHcbENMvrB8cpK cG/Cjk+FKXrnJuP8bhwHuj9bmHYpeeBZqMnkILEPr479v7DHITEeOjWX5VYFqhEQ0z2Z WcuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=msYnu0kx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x30si15443260pgl.477.2019.04.23.05.51.06; Tue, 23 Apr 2019 05:51:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=msYnu0kx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727630AbfDWMtu (ORCPT + 99 others); Tue, 23 Apr 2019 08:49:50 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48608 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbfDWMtt (ORCPT ); Tue, 23 Apr 2019 08:49:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=35dsPaMjiCJMbp0smPFnBa37kyiFHneebblaSoEgPnQ=; b=msYnu0kx2JON/wV/5dmMl8vxA dNCkZAqilQAWKgXdb+pllDgIM1dvdIRn2PTFPCpPa2rT6jXvYFDwgwJ3h3lZoIhmej0toM48+/ppr RohELwfLN2xCfUtByxgahp0hU50CmU7ZInrqna7acSRDLG6c3QibbucubGNFtCp9B+Y0ozgd2WT4o YmvDH3/dt8VwyJiZCrP/zGJP5MwJsY7HaKgut9UodsIMQT0oida9zEnUjEPcD1ArwgTEhu1ogh2g7 uhCboq8dRcEn79wKSzqUJPyUl3ZBauPLrK9e+FM9A3107dB1aRvokG5XAdcEqf5koNpX4UdSCUGyU i6pxQQxMA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIuqu-0004F8-De; Tue, 23 Apr 2019 12:48:48 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A6FE829B8FE27; Tue, 23 Apr 2019 14:48:45 +0200 (CEST) Date: Tue, 23 Apr 2019 14:48:45 +0200 From: Peter Zijlstra To: Matthew Wilcox Cc: Michal Hocko , Michel Lespinasse , Laurent Dufour , Andrew Morton , "Kirill A. Shutemov" , Andi Kleen , dave@stgolabs.net, Jan Kara , aneesh.kumar@linux.ibm.com, Benjamin Herrenschmidt , mpe@ellerman.id.au, Paul Mackerras , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Will Deacon , Sergey Senozhatsky , sergey.senozhatsky.work@gmail.com, Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, Daniel Jordan , David Rientjes , Jerome Glisse , Ganesh Mahendran , Minchan Kim , Punit Agrawal , vinayak menon , Yang Shi , zhong jiang , Haiyan Song , Balbir Singh , sj38.park@gmail.com, Mike Rapoport , LKML , linux-mm , haren@linux.vnet.ibm.com, Nick Piggin , "Paul E. McKenney" , Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v12 00/31] Speculative page faults Message-ID: <20190423124845.GS4038@hirez.programming.kicks-ass.net> References: <20190416134522.17540-1-ldufour@linux.ibm.com> <20190423104707.GK25106@dhcp22.suse.cz> <20190423124148.GA19031@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423124148.GA19031@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 05:41:48AM -0700, Matthew Wilcox wrote: > On Tue, Apr 23, 2019 at 12:47:07PM +0200, Michal Hocko wrote: > > Well, I believe we should _really_ re-evaluate the range locking sooner > > rather than later. Why? Because it looks like the most straightforward > > approach to the mmap_sem contention for most usecases I have heard of > > (mostly a mm{unm}ap, mremap standing in the way of page faults). > > On a plus side it also makes us think about the current mmap (ab)users > > which should lead to an overall code improvements and maintainability. > > Dave Chinner recently did evaluate the range lock for solving a problem > in XFS and didn't like what he saw: > > https://lore.kernel.org/linux-fsdevel/20190418031013.GX29573@dread.disaster.area/T/#md981b32c12a2557a2dd0f79ad41d6c8df1f6f27c > > I think scaling the lock needs to be tied to the actual data structure > and not have a second tree on-the-side to fake-scale the locking. Right, which is how I ended up using the split PT locks. They already provide fine(r) grained locking.