Received: by 10.223.176.5 with SMTP id f5csp1010220wra; Tue, 6 Feb 2018 11:00:08 -0800 (PST) X-Google-Smtp-Source: AH8x2248V19F1NyJNIadc+XD2KtDfXGLKIuCLcleTR63lqIHOBN4cvtZNfL82oCHmatc2Wgowr/P X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr3351367plx.208.1517943608011; Tue, 06 Feb 2018 11:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517943607; cv=none; d=google.com; s=arc-20160816; b=rTxOA9CiO23VYfaErl1UpT1R0IrDYpMEi/5cD+xyPjUG7cSiq4SgDjP6ckKZXL44i+ hJIoOfVXx3DDLn3JsuTjdXpnS2xhrCegZSBUHgjzI5ccuxxey/NfwI1/ZSqMMjpvsSVz CEkLMnvljhfd7IgT4AGXHQ5gglPTFEhDuml84cJSBUdGzI6r/hdQ6HfYjmSyefzsFs6o XDY1u5oWOI2NBFaoJ7nyn7AT7PM7j+5/Moy+PSZOFgiFCedlQObs4QuyfhLgxWWJydBq mCqqwlJQYoEWySGAdza2DwrlofNzAAvJ27zanjcCPI1YI6WhP67iStij5+1bNto0Y1fj O0Tw== 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:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=NEsRrlc2GrUb6q5YTpIgodtr5R7phCHbt6UJcvwYEeo=; b=Nps5BmEtsbdT9iDzEzAFTcH5mN+6dIU/pLgo/TlHkyy+aCThcFCT/8p9zFYhKNsqYR z1ZIKJG6RwSlwdBMYL5E7skCkVZy32dmQGYHmzIMl0PrsV002LNJSHVYfBepm9wOAloX vaFFwVi4KjtJtrMdEeUBkD/owET8UakVYk/Qrc0lN+nrAu+rsh4f9lalejxms248qwt3 zYdNLBe7gRKvN53V3DjLdXfy2Z/w8lKh9TEN4zPKWg5Bgx244FO5+LmMpx9tj91KuNO3 kuNoduPcDP7+ghUDGx6Uugp9bNDPkRcfEZz6Vb45kAB+Sh7q/tG1D+75gDbjZle/c/Na dsGA== ARC-Authentication-Results: i=1; mx.google.com; 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 a67si120643pgc.151.2018.02.06.10.59.52; Tue, 06 Feb 2018 11:00:07 -0800 (PST) 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; 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 S1752788AbeBFS6D (ORCPT + 99 others); Tue, 6 Feb 2018 13:58:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:50351 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752529AbeBFS56 (ORCPT ); Tue, 6 Feb 2018 13:57:58 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 58AF1AD45; Tue, 6 Feb 2018 18:57:57 +0000 (UTC) Date: Tue, 6 Feb 2018 10:48:44 -0800 From: Davidlohr Bueso To: Laurent Dufour Cc: Davidlohr Bueso , akpm@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, jack@suse.cz, mhocko@kernel.org, kirill.shutemov@linux.intel.com, mawilcox@microsoft.com, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 00/64] mm: towards parallel address space operations Message-ID: <20180206184844.olcd34engojudsxt@linux-n805> Mail-Followup-To: Laurent Dufour , Davidlohr Bueso , akpm@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, jack@suse.cz, mhocko@kernel.org, kirill.shutemov@linux.intel.com, mawilcox@microsoft.com, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20180205012754.23615-1-dbueso@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 05 Feb 2018, Laurent Dufour wrote: >On 05/02/2018 02:26, Davidlohr Bueso wrote: >> From: Davidlohr Bueso >> >> Hi, >> >> This patchset is a new version of both the range locking machinery as well >> as a full mmap_sem conversion that makes use of it -- as the worst case >> scenario as all mmap_sem calls are converted to a full range mmap_lock >> equivalent. As such, while there is no improvement of concurrency perse, >> these changes aim at adding the machinery to permit this in the future. > >Despite the massive rebase, what are the changes in this series compared to >the one I sent in last May - you silently based on, by the way : >https://lkml.org/lkml/2017/5/24/409 Hardly, but yes I meant to reference that. It ended up being easier to just do a from scratch version. I haven't done a comparison, but at first I thought you missed gup users (now not so much), this patchset allows testing on more archs (see below), we remove the trylock in vm_insert_page(), etc. >> >> Direct users of the mm->mmap_sem can be classified as those that (1) acquire >> and release the lock within the same context, and (2) those who directly >> manipulate the mmap_sem down the callchain. For example: >> >> (1) down_read(&mm->mmap_sem); >> /* do something */ >> /* nobody down the chain uses mmap_sem directly */ >> up_read(&mm->mmap_sem); >> >> (2a) down_read(&mm->mmap_sem); >> /* do something that retuns mmap_sem unlocked */ >> fn(mm, &locked); >> if (locked) >> up_read(&mm->mmap_sem); >> >> (2b) down_read(&mm->mmap_sem); >> /* do something that in between released and reacquired mmap_sem */ >> fn(mm); >> up_read(&mm->mmap_sem); > >Unfortunately, there are also indirect users which rely on the mmap_sem >locking to protect their data. For the first step using a full range this >doesn't matter, but when refining the range, these one would be the most >critical ones as they would have to be reworked to take the range in account. Of course. The value I see in this patchset is that we can determine whether or not we move forward based on the worst case scenario numbers. >> Testing: I have setup an mmtests config file with all the workloads described: >> http://linux-scalability.org/mmtests-config > >Is this link still valid, I can't reach it ? Sorry, that should have been: https://linux-scalability.org/range-mmap_lock/mmtests-config Thanks, Davidlohr