Info

unsigned find_get_pages(struct address_space *mapping, pgoff_t start, unsigned int nr_pages, struct page **pages); unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, unsigned int nr_pages, struct page **pages); unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, int tag, unsigned int nr_pages, struct page **pages);

□ find_get_pages returns up to nr_pages pages in the mapping starting from the page cache offset start. Pointers to the pages are placed on the array pages. The function does not guarantee to return a continuous range of pages — there can be holes for non-present pages. The return value is the number of pages that were found.

□ find_get_pages_contig works similarly to find_get_pages, but the selected page range is guaranteed to be continuous. The function stops to add pages to the page array when the first hole is discovered.

□ find_get_pages_tag operates like find_pages, but only selects pages that have a specific tag set. Additionally, the index parameter points to the page cache index of the page that immediately follows the last page in the resulting page array.

Continue reading here: Waiting on Pages

Was this article helpful?

0 0