Messages in this thread | | | Subject | Re: [PATCH v2 1/3] mm/gup: introduce pin_user_page() | From | John Hubbard <> | Date | Sat, 29 Aug 2020 14:57:24 -0700 |
| |
On 8/29/20 7:54 AM, Christoph Hellwig wrote: > On Sat, Aug 29, 2020 at 01:08:51AM -0700, John Hubbard wrote: >> pin_user_page() is the FOLL_PIN equivalent of get_page(). >> >> This was always a missing piece of the pin/unpin API calls (early >> reviewers of pin_user_pages() asked about it, in fact), but until now, >> it just wasn't needed. Finally though, now that the Direct IO pieces in >> block/bio are about to be converted to use FOLL_PIN, it turns out that >> there are some cases in which get_page() and get_user_pages_fast() were >> both used. Converting those sites requires a drop-in replacement for >> get_page(), which this patch supplies. > > I find the name really confusing vs pin_user_pages*, as it suggests as > single version of the same. It also seems partially wrong, at least > in the direct I/O case as the only thing pinned here is the zero page. > > So maybe pin_kernel_page is a better name together with an explanation? > Or just pin_page? >
Yes. Both its behavior and use are closer to get_page() than it is to get_user_pages(). So pin_page() is just right.
thanks, -- John Hubbard NVIDIA
| |