On 1/25/23 08:38, Jason Gunthorpe wrote:
...
I missed this on my review of v1 of this series: the FOLL_TOUCH change
looks like a mistake, yes? It should just be left as-is:
gup_flags |= FOLL_PIN;
No, not a mistake.
The transformation is this:
- return get_user_pages_unlocked(start, nr_pages, pages, gup_flags);
+ gup_flags |= FOLL_PIN | FOLL_TOUCH;
+ return __gup_longterm_locked(current->mm, start, nr_pages, pages, NULL,
+ &locked, gup_flags);
Ie we switch get_user_pages_unlocked() for __gup_longterm_locked()
Howevr get_user_pages_unlocked() was adding the FOLL_TOUCH before
calling __gup_longterm_locked():
- ret = __gup_longterm_locked(mm, start, nr_pages, pages, NULL, &locked,
- gup_flags | FOLL_TOUCH);
Thus we have to lift the FOLL_TOUCH when we do the function call
replacement.
OK good. Sorry about the moment of panic, haha. :)
Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx>
thanks,
--
John Hubbard
NVIDIA