Thread (4 messages) flat view 4 messages, 3 authors, 2020-05-23

Re: [linux-next RFC] mm/gup.c: Convert to use get_user_pages_fast_only()

From: John Hubbard <jhubbard@nvidia.com>
Date: 2020-05-23 22:18:49
Also in: linux-mm

On 2020-05-23 12:35, Souptick Joarder wrote:
...
quoted
Everything you have done here is an improvement, and I'd be happy to
see it go in (after fixing the bug I note below).

But in reading through it, I noticed almost every user ...
quoted
-     if (__get_user_pages_fast(hva, 1, 1, &page) == 1) {
+     if (get_user_pages_fast_only(hva, 1, FOLL_WRITE, &page) == 1) {
passes '1' as the second parameter.  So do we want to add:

static inline bool get_user_page_fast_only(unsigned long addr,
                 unsigned int gup_flags, struct page **pagep)
{
         return get_user_pages_fast_only(addr, 1, gup_flags, pagep) == 1;
}
Yes, this can be added. Does get_user_page_fast_only() naming is fine ?

It seems like a good name to me. And I think that the new wrapper call is
a good move, too.

I did pause and reflect for a moment about the number gup/pup API calls we
are building up, but that's merely an indication of the wide usage of this
functionality. So it all feels about right.


thanks,
-- 
John Hubbard
NVIDIA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help