Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp355094ybx; Wed, 6 Nov 2019 18:26:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxhp93ytBc+O/okO8Lr4mQP+Bkh/nwRSh08oe4JDcNuW3QK1RY5f96rOX7b6sjxYmymbaIj X-Received: by 2002:a17:906:4dda:: with SMTP id f26mr794540ejw.89.1573093577288; Wed, 06 Nov 2019 18:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573093577; cv=none; d=google.com; s=arc-20160816; b=YWxutsJZiGZ/2G1Wa3T5vF+YmNsQXil/SRTHHYoMg9WS3FF+Hg1GaEWBMvKXFokfMc 5BllqeNKanuOJJvIyCxi3R332QlrJiiZ5pBSj5uY5+jbLsdurG7KoOqzUd20A5vvs/EP gyRiCO9uVtPiRCHZ1xGL0qM6faKEVU5GVtOHhh83WljGEctnKQbBcBQI/SvcrXFPG7di SYKv8ni3PXIiBR2P+zTCqUne68Yk44ChDKe0od6jNhK9ca3YRTvMBbZyEnczJB6oTImO dK1KEaGcl5sdcOlwzbbPPHvqmKqZMV5qQgHvAmj4k0U0lhC5H9YrQaZBxEjOe8AyopAX wi6A== 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=FGmPQcotCKxs8y+rJgObGHfH9CXkFNaFpo3hq/yIf2Q=; b=OqCLYp3q6B92S4RCzjSB94ZB19LHmotxCGPIos8G/LR51xgQfxsxpBxRHDkzBEmQZ0 heTwxkaO0wIkHsxH44tPBTIPT/+3pYPgEQ6UtEviVGTyPoXZC0h1L0A33RrcW/Nxa+U+ 7yx9rCdbhnnXlzKYr4UWn+IzFvGwMy78QA/dEDcd/ztlm+g7MiGlJGASWAORF7J1yYHh KJXM2KQek8sUEI6e6lBuMsKN+e5B1pcdyJTiMsnurjHESjBOcxFS+gGla5qV5yk+k+2g yb/kyUD/4Wp/yGHh688Fmh7BCztu+SJRfCdAX1sIGtntcfQTrKlhwBceYM5I/CkQdpul l7hg== 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 b22si574517ejv.159.2019.11.06.18.25.52; Wed, 06 Nov 2019 18:26:17 -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 S1732993AbfKGCZK (ORCPT + 99 others); Wed, 6 Nov 2019 21:25:10 -0500 Received: from mga12.intel.com ([192.55.52.136]:35901 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727778AbfKGCZK (ORCPT ); Wed, 6 Nov 2019 21:25:10 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 18:25:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="227685020" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga004.fm.intel.com with ESMTP; 06 Nov 2019 18:25:08 -0800 Date: Wed, 6 Nov 2019 18:25:08 -0800 From: Ira Weiny To: John Hubbard Cc: Mike Rapoport , Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN Message-ID: <20191107022508.GB32084@iweiny-DESK2.sc.intel.com> References: <20191103211813.213227-1-jhubbard@nvidia.com> <20191103211813.213227-6-jhubbard@nvidia.com> <20191105131032.GG25005@rapoport-lnx> <9ac948a4-59bf-2427-2007-e460aad2848a@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ac948a4-59bf-2427-2007-e460aad2848a@nvidia.com> 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 > > > ... > >> +This document describes the following functions: :: > >> + > >> + pin_user_pages > >> + pin_user_pages_fast > >> + pin_user_pages_remote > >> + > >> + pin_longterm_pages > >> + pin_longterm_pages_fast > >> + pin_longterm_pages_remote > >> + > >> +Basic description of FOLL_PIN > >> +============================= > >> + > >> +A new flag for get_user_pages ("gup") has been added: FOLL_PIN. FOLL_PIN has > > > > Consider reading this after, say, half a year ;-) > > > > OK, OK. I knew when I wrote that that it was not going to stay new forever, but > somehow failed to write the right thing anyway. :) > > Here's a revised set of paragraphs: > > Basic description of FOLL_PIN > ============================= > > FOLL_PIN and FOLL_LONGTERM are flags that can be passed to the get_user_pages*() > ("gup") family of functions. FOLL_PIN has significant interactions and > interdependencies with FOLL_LONGTERM, so both are covered here. > > Both FOLL_PIN and FOLL_LONGTERM are internal to gup, meaning that neither > FOLL_PIN nor FOLL_LONGTERM should not appear at the gup call sites. This allows > the associated wrapper functions (pin_user_pages() and others) to set the > correct combination of these flags, and to check for problems as well. I like this revision as well. Ira