Re: [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-30 Thread John Hubbard
On 8/30/20 1:17 PM, Al Viro wrote: ... Why: In order to incrementally change Direct IO callers from calling get_user_pages_fast() and put_page(), over to calling pin_user_pages_fast() and unpin_user_page(), there need to be mid-level routines that specifically call one or the other systems, for b

Re: [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-30 Thread Al Viro
On Sat, Aug 29, 2020 at 01:08:52AM -0700, John Hubbard wrote: > The new routines are: > iov_iter_pin_user_pages() > iov_iter_pin_user_pages_alloc() > > and those correspond to these pre-existing routines: > iov_iter_get_pages() > iov_iter_get_pages_alloc() > > Also, pipe_get_pages

Re: [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-29 Thread John Hubbard
On 8/29/20 7:58 AM, Christoph Hellwig wrote: On Sat, Aug 29, 2020 at 01:08:52AM -0700, John Hubbard wrote: ... @@ -1280,7 +1281,11 @@ static inline ssize_t __pipe_get_pages(struct iov_iter *i, maxsize = n; n += *start; while (n > 0) { - get_page(*pages++ =

Re: [PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-29 Thread Christoph Hellwig
On Sat, Aug 29, 2020 at 01:08:52AM -0700, John Hubbard wrote: > The new routines are: > iov_iter_pin_user_pages() > iov_iter_pin_user_pages_alloc() > > and those correspond to these pre-existing routines: > iov_iter_get_pages() > iov_iter_get_pages_alloc() > > Also, pipe_get_pages

[PATCH v2 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-29 Thread John Hubbard
The new routines are: iov_iter_pin_user_pages() iov_iter_pin_user_pages_alloc() and those correspond to these pre-existing routines: iov_iter_get_pages() iov_iter_get_pages_alloc() Also, pipe_get_pages() and related are changed so as to pass down a "use_pup" (use pin_user_page() i