1FIND_OR_CREATE_PAGE(9)    Memory Management in Linux    FIND_OR_CREATE_PAGE(9)
2
3
4

NAME

6       find_or_create_page - locate or add a pagecache page
7

SYNOPSIS

9       struct page * find_or_create_page(struct address_space * mapping,
10                                         pgoff_t index, gfp_t gfp_mask);
11

ARGUMENTS

13       mapping
14           the page's address_space
15
16       index
17           the page's index into the mapping
18
19       gfp_mask
20           page allocation mode
21

DESCRIPTION

23       Looks up the page cache slot at mapping & offset. If there is a page
24       cache page, it is returned locked and with an increased refcount.
25
26       If the page is not present, a new page is allocated using gfp_mask and
27       added to the page cache and the VM's LRU list. The page is returned
28       locked and with an increased refcount.
29
30       On memory exhaustion, NULL is returned.
31
32       find_or_create_page may sleep, even if gfp_flags specifies an atomic
33       allocation!
34
36Kernel Hackers Manual 3.10         June 2019            FIND_OR_CREATE_PAGE(9)
Impressum