From: Jerome Glisse Subject: Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN Date: Mon, 4 Nov 2019 15:48:28 -0500 Message-ID: <20191104204828.GC7731@redhat.com> References: <20191103211813.213227-1-jhubbard@nvidia.com> <20191103211813.213227-6-jhubbard@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: David Rientjes Cc: John Hubbard , 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" , Ira Weiny , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman List-Id: dri-devel@lists.freedesktop.org On Mon, Nov 04, 2019 at 12:33:09PM -0800, David Rientjes wrote: >=20 >=20 > On Sun, 3 Nov 2019, John Hubbard wrote: >=20 > > Introduce pin_user_pages*() variations of get_user_pages*() calls, > > and also pin_longterm_pages*() variations. > >=20 > > These variants all set FOLL_PIN, which is also introduced, and > > thoroughly documented. > >=20 > > The pin_longterm*() variants also set FOLL_LONGTERM, in addition > > to FOLL_PIN: > >=20 > > pin_user_pages() > > pin_user_pages_remote() > > pin_user_pages_fast() > >=20 > > pin_longterm_pages() > > pin_longterm_pages_remote() > > pin_longterm_pages_fast() > >=20 > > All pages that are pinned via the above calls, must be unpinned via > > put_user_page(). > >=20 >=20 > Hi John, >=20 > I'm curious what consideration is given to what pageblock migrate types= =20 > that FOLL_PIN and FOLL_LONGTERM pages originate from, assuming that=20 > longterm would want to originate from MIGRATE_UNMOVABLE pageblocks for th= e=20 > purposes of anti-fragmentation? We do not control page block, GUP can happens on _any_ page that is map inside a process (anonymous private vma or regular file back one). Cheers, J=E9r=F4me