struct page *page_cache_alloc(struct address_space *x) struct page *page_cache_alloc_cold(struct address_space *x)

Initially, the radix tree is left untouched because work is delegated to alloc_pages, which takes a page frame from the buddy system (described in Chapter 3). However, the address space argument is required to infer from which memory region that page must come.

Adding the new page to the page cache is a little more complicated and falls under the responsibility of add_to_page_cache. Here, radix_tree_insert inserts the page instance associated with the page into the radix tree of the address space involved:

Continue reading here: Mmfilemapc

Was this article helpful?

0 0