Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread John Hubbard
On 11/13/19 3:22 PM, John Hubbard wrote: > On 11/13/19 2:43 AM, Jan Kara wrote: > ... >> How does FOLL_PIN result in grabbing (at least normal, for now) page >> reference? >> I didn't find that anywhere in this patch but it is a prerequisite to >> converting any user to pin_user_pages()

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread John Hubbard
On 11/13/19 2:43 AM, Jan Kara wrote: ... How does FOLL_PIN result in grabbing (at least normal, for now) page reference? I didn't find that anywhere in this patch but it is a prerequisite to converting any user to pin_user_pages() interface, right? ohhh, I messed up on this intermediate

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread John Hubbard
On 11/13/19 10:59 AM, Ira Weiny wrote: On Tue, Nov 12, 2019 at 08:26:56PM -0800, John Hubbard wrote: Introduce pin_user_pages*() variations of get_user_pages*() calls, and also pin_longterm_pages*() variations. These variants all set FOLL_PIN, which is also introduced, and thoroughly

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread Ira Weiny
On Tue, Nov 12, 2019 at 08:26:56PM -0800, John Hubbard wrote: > Introduce pin_user_pages*() variations of get_user_pages*() calls, > and also pin_longterm_pages*() variations. > > These variants all set FOLL_PIN, which is also introduced, and > thoroughly documented. > > The pin_longterm*()

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread Dan Williams
On Wed, Nov 13, 2019 at 2:43 AM Jan Kara wrote: > > On Tue 12-11-19 20:26:56, John Hubbard wrote: > > Introduce pin_user_pages*() variations of get_user_pages*() calls, > > and also pin_longterm_pages*() variations. > > > > These variants all set FOLL_PIN, which is also introduced, and > >

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread Ira Weiny
> > +/** > > + * pin_user_pages_fast() - pin user pages in memory without taking locks > > + * > > + * Nearly the same as get_user_pages_fast(), except that FOLL_PIN is set. > > See > > + * get_user_pages_fast() for documentation on the function arguments, > > because > > + * the arguments here

Re: [PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-13 Thread Jan Kara
On Tue 12-11-19 20:26:56, John Hubbard wrote: > Introduce pin_user_pages*() variations of get_user_pages*() calls, > and also pin_longterm_pages*() variations. > > These variants all set FOLL_PIN, which is also introduced, and > thoroughly documented. > > The pin_longterm*() variants also set

[PATCH v4 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-12 Thread John Hubbard
Introduce pin_user_pages*() variations of get_user_pages*() calls, and also pin_longterm_pages*() variations. These variants all set FOLL_PIN, which is also introduced, and thoroughly documented. The pin_longterm*() variants also set FOLL_LONGTERM, in addition to FOLL_PIN: pin_user_pages()