From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8023CC169C4 for ; Mon, 11 Feb 2019 22:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49B84218A3 for ; Mon, 11 Feb 2019 22:23:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="DQuWhkgC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbfBKWXo (ORCPT ); Mon, 11 Feb 2019 17:23:44 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40430 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727200AbfBKWXj (ORCPT ); Mon, 11 Feb 2019 17:23:39 -0500 Received: by mail-pf1-f193.google.com with SMTP id h1so229484pfo.7 for ; Mon, 11 Feb 2019 14:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1WLlOJDJcxcIXG3soDmEUGpqQwzaXnBtVm7Uc05eSQI=; b=DQuWhkgCDdMgzUqdZrbzehZBo86Fa9rjKbDUIz7mCPq+AD222ZIWTnM6kmQS8oyRpy LPubwTMgDAA/bsdjRIsGhu6mgUeQDqpov+bFcgQmHS042fHxaHZL8GY027k2ThHGpw/R xmuYJPi9flXgRJriW2XzV8jfEjvJ099LYKBJbFalttj4vPXCtJ34YZuIS+zSuPBmcADJ 6u4G5QQZLWsjMJfNH5zzzCWXPNfR5vJIuOjm7dpli3cKkEhsmZBMbWALN81TvHrSqn0z khWaiTAIdL5o5BJNt/xom8HlwcvrAQ8fawFLrcpdE8HNinN/jRVc7wZAZz5sb9m1sGtT FGoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1WLlOJDJcxcIXG3soDmEUGpqQwzaXnBtVm7Uc05eSQI=; b=YnQHr3GFEBvqXCvplibVLHaSWgXqnK4GY+U2qJoocpTbzDRuKpDlQkrHKWhLXRWvoG EbJ63rw/B5tohyM4i1vVG/AxveZCzGv86jI/2ew3bQAIBk9bMZ1S3YHzmY7vBzI+E1VN e2+KzB4iyNG50RTN2ZfQk2DVBnbw+FrONUHdug2OcVhLRpuz6vlrbDH40psilZBgEYue 6apH3wYa8/zhanENSIRHxJoDqi2GuUNyvx9c/JZlB8BVON1FgWQWQ0HnTJRnzc1tYpJF DHl23YTMkXZ1XbwmS+KDAmzgUBfhlYOrqMgfdM/NjnOM9AJY7d21LOC43dgkQVyaNnuA ZXlg== X-Gm-Message-State: AHQUAua0XbZQx1eUlaRjxjLZyMFgH+gJhDXjZVGfQlUsF+9q8chKauKW nVoknznSj6hGvLFLB4RSoTJdEA== X-Google-Smtp-Source: AHgI3IY25dSeKcjBLIFYZgY5sGbu3MRMXrBBw6lZ8FEZg89r9SGm32f9SsdhQVc1empO+bBDEtftnA== X-Received: by 2002:a62:398d:: with SMTP id u13mr580196pfj.32.1549923818304; Mon, 11 Feb 2019 14:23:38 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id f67sm15264387pff.29.2019.02.11.14.23.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 14:23:35 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gtJzD-0003XL-8J; Mon, 11 Feb 2019 15:23:35 -0700 Date: Mon, 11 Feb 2019 15:23:35 -0700 From: Jason Gunthorpe To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Daniel Borkmann , Davidlohr Bueso , "netdev@vger.kernel.org" , "Marciniszyn, Mike" , "Dalessandro, Dennis" , Doug Ledford , Andrew Morton , "Kirill A. Shutemov" , "Williams, Dan J" Subject: Re: [PATCH 0/3] Add gup fast + longterm and use it in HFI1 Message-ID: <20190211222335.GK24692@ziepe.ca> References: <20190211201643.7599-1-ira.weiny@intel.com> <20190211204049.GB2771@ziepe.ca> <2807E5FD2F6FDA4886F6618EAC48510E79BCF04C@CRSMSX101.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2807E5FD2F6FDA4886F6618EAC48510E79BCF04C@CRSMSX101.amr.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 11, 2019 at 09:14:56PM +0000, Weiny, Ira wrote: > > > > On Mon, Feb 11, 2019 at 12:16:40PM -0800, ira.weiny@intel.com wrote: > > > From: Ira Weiny > > > > > > NOTE: This series depends on my clean up patch to remove the write > > > parameter from gup_fast_permitted()[1] > > > > > > HFI1 uses get_user_pages_fast() due to it performance advantages. > > > Like RDMA, > > > HFI1 pages can be held for a significant time. But > > > get_user_pages_fast() does not protect against mapping of FS DAX pages. > > > > If HFI1 can use the _fast varient, can't all the general RDMA stuff use it too? > > > > What is the guidance on when fast vs not fast should be use? > > Right now it can't because it holds mmap_sem across the call. Once > Shiraz's patches are accepted removing the umem->hugetlb flag I > think we can change umem.c. Okay, that make sense, we should change it when Shiraz's patches are merged > Also, it specifies FOLL_FORCE which can't currently be specified > with gup fast. One idea I had was to change get_user_pages_fast() > to use gup_flags instead of a single write flag. But that proved to > be a very big cosmetic change across a lot of callers so I went this > way. I think you should do it.. :) Jason