Re: [PATCH v8 24/26] mm/gup: track FOLL_PIN pages

2019-12-10 Thread John Hubbard
On 12/10/19 5:39 AM, Jan Kara wrote: ... >> +void grab_page(struct page *page, unsigned int flags) >> +{ >> +if (flags & FOLL_GET) >> +get_page(page); >> +else if (flags & FOLL_PIN) { >> +get_page(page); >> +WARN_ON_ONCE(flags & FOLL_GET); >> +

Re: [PATCH v8 24/26] mm/gup: track FOLL_PIN pages

2019-12-10 Thread Jan Kara
On Mon 09-12-19 14:53:42, John Hubbard wrote: > Add tracking of pages that were pinned via FOLL_PIN. > > As mentioned in the FOLL_PIN documentation, callers who effectively set > FOLL_PIN are required to ultimately free such pages via unpin_user_page(). > The effect is similar to FOLL_GET, and

[PATCH v8 24/26] mm/gup: track FOLL_PIN pages

2019-12-09 Thread John Hubbard
Add tracking of pages that were pinned via FOLL_PIN. As mentioned in the FOLL_PIN documentation, callers who effectively set FOLL_PIN are required to ultimately free such pages via unpin_user_page(). The effect is similar to FOLL_GET, and may be thought of as "FOLL_GET for DIO and/or RDMA use".