Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp847052imp; Wed, 20 Feb 2019 10:03:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IblDQJrE3EGvzvTRdl2fLi/HHLsTtE2qGbH/7rjzWr+77MSzJf6yDqL6OFrrPirFlLRrJSe X-Received: by 2002:a62:f201:: with SMTP id m1mr24346193pfh.97.1550685820808; Wed, 20 Feb 2019 10:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550685820; cv=none; d=google.com; s=arc-20160816; b=ebTfIRrJwlxi5qF8KLrbD6z1DM5N7ZneY2LUEObJbQ1FZW/mhYx2PoF8fuYGhbBTD5 Um4Syxd3YZ9FZpLTqSJTGQJVIWVMXQcsBqBgVkF42IHw5bpza6nft3mlol59bRiMLcE7 zYE4gEz1POjwGYnlZbvNs8hbg17kH7DKc29X7mxzOx0A/0NA4wqECrjs3DvayeVBSi1R bAsRzD2CER6XCC+/GX0ZS0a2Ew3jObY9TUDUq/Xbql3/qh8JEALLXrkOR8Mh9uBcfC2e lEuHj8LANn7v9melzmvUYSTHbtNgBwjZnT+N6zbx7o0wpyxqjfimX3kl4HRR+8pUN/CM 9ASg== 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; bh=vTd0H+RVAnb2ymTxlDq2vbImFb/THbfRSKn13i1XQYE=; b=aoEyPRttIhPcu8ugqHZFzMapVtLqACxeWK5IVZtb7f9QGJ07IbXS4rlV6QVui2va1e GZlJIcHmYNCu0iXp5uVzlHNqL5rymrlaU46Qgeqnm2OTkVXxWuq57zLKFbGlV271HRWT IHennXp/A82GKz4gTVl7XqOz3SeeBb0FCmpBuO1IlLm6qrTv+ZDCmbW0/r4908j+YopS uXkc0zWry2u3CbcxfpuIFS7UpSsHL4H4wrAqqMcnY0+3NSw0i73otuyenmpydKGhqDU7 sG7h1ml5m17aC3MaGcAB6h8bP9+/P+6V5uZUg43lkVe5MOEhfeYRwS84R1pRM+WHvuHT e6xA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si9265494pgd.52.2019.02.20.10.03.24; Wed, 20 Feb 2019 10:03:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbfBTSC6 (ORCPT + 99 others); Wed, 20 Feb 2019 13:02:58 -0500 Received: from mga12.intel.com ([192.55.52.136]:24817 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfBTSC5 (ORCPT ); Wed, 20 Feb 2019 13:02:57 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 10:02:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,391,1544515200"; d="scan'208";a="148440466" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga001.fm.intel.com with ESMTP; 20 Feb 2019 10:02:55 -0800 Date: Wed, 20 Feb 2019 10:02:56 -0800 From: Ira Weiny To: Christoph Hellwig Cc: John Hubbard , Andrew Morton , Michal Hocko , "Kirill A. Shutemov" , Peter Zijlstra , Jason Gunthorpe , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , Martin Schwidefsky , Heiko Carstens , Rich Felker , Yoshinori Sato , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, linux-fpga@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, linux-scsi@vger.kernel.org, devel@driverdev.osuosl.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-fbdev@vger.kernel.org, xen-devel@lists.xenproject.org, devel@lists.orangefs.org, ceph-devel@vger.kernel.org, rds-devel@oss.oracle.com Subject: Re: [RESEND PATCH 0/7] Add FOLL_LONGTERM to GUP fast and use it Message-ID: <20190220180255.GA12020@iweiny-DESK2.sc.intel.com> References: <20190220053040.10831-1-ira.weiny@intel.com> <20190220151930.GB11695@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190220151930.GB11695@infradead.org> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 20, 2019 at 07:19:30AM -0800, Christoph Hellwig wrote: > On Tue, Feb 19, 2019 at 09:30:33PM -0800, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > Resending these as I had only 1 minor comment which I believe we have covered > > in this series. I was anticipating these going through the mm tree as they > > depend on a cleanup patch there and the IB changes are very minor. But they > > could just as well go through the IB tree. > > > > NOTE: This series depends on my clean up patch to remove the write parameter > > from gup_fast_permitted()[1] > > > > HFI1, qib, and mthca, use get_user_pages_fast() due to it performance > > advantages. These pages can be held for a significant time. But > > get_user_pages_fast() does not protect against mapping of FS DAX pages. > > This I don't get - if you do lock down long term mappings performance > of the actual get_user_pages call shouldn't matter to start with. > > What do I miss? A couple of points. First "longterm" is a relative thing and at this point is probably a misnomer. This is really flagging a pin which is going to be given to hardware and can't move. I've thought of a couple of alternative names but I think we have to settle on if we are going to use FL_LAYOUT or something else to solve the "longterm" problem. Then I think we can change the flag to a better name. Second, It depends on how often you are registering memory. I have spoken with some RDMA users who consider MR in the performance path... For the overall application performance. I don't have the numbers as the tests for HFI1 were done a long time ago. But there was a significant advantage. Some of which is probably due to the fact that you don't have to hold mmap_sem. Finally, architecturally I think it would be good for everyone to use *_fast. There are patches submitted to the RDMA list which would allow the use of *_fast (they reworking the use of mmap_sem) and as soon as they are accepted I'll submit a patch to convert the RDMA core as well. Also to this point others are looking to use *_fast.[2] As an asside, Jasons pointed out in my previous submission that *_fast and *_unlocked look very much the same. I agree and I think further cleanup will be coming. But I'm focused on getting the final solution for DAX at the moment. Ira