Thread (12 messages) 12 messages, 3 authors, 2020-08-30

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

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2020-08-30 20:17:37
Also in: linux-fsdevel, linux-mm, linux-xfs, lkml

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() and related are changed so as to pass
down a "use_pup" (use pin_user_page() instead of get_page()) bool
argument.

Unlike the iov_iter_get_pages*() routines, the
iov_iter_pin_user_pages*() routines assert that only ITER_IOVEC or
ITER_PIPE items are passed in. They then call pin_user_page*(), instead
of get_user_pages_fast() or get_page().

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 both page
acquisition and page release.
Hmm...  Do you plan to kill iov_iter_get_pages* off, eventually getting
rid of that use_pup argument?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help