|GET_USER_PAGES_FAST(9)||Memory Management in Linux||GET_USER_PAGES_FAST(9)|
get_user_pages_fast - pin user pages in memory
int get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page ** pages);
Returns number of pages pinned. This may be fewer than the number requested. If nr_pages is 0 or negative, returns 0. If no pages were pinned, returns -errno.
get_user_pages_fast provides equivalent functionality to get_user_pages, operating on current and current->mm, with force=0 and vma=NULL. However unlike get_user_pages, it must be called without mmap_sem held.
get_user_pages_fast may take mmap_sem and page table locks, so no assumptions can be made about lack of locking. get_user_pages_fast is to be implemented in a way that is advantageous (vs get_user_pages) when the user memory area is already faulted in and present in ptes. However if the pages have to be faulted in, it may turn out to be slightly slower so callers need to carefully consider what to use. On many architectures, get_user_pages_fast simply falls back to get_user_pages.
|January 2017||Kernel Hackers Manual 4.8.|