Lines Matching full:page

9  * page_is_file_lru - should the page be on a file LRU or anon LRU?
10 * @page: the page to test
12 * Returns 1 if @page is a regular filesystem backed page cache page or a lazily
13 * freed anonymous page (e.g. via MADV_FREE). Returns 0 if @page is a normal
14 * anonymous page, a tmpfs page or otherwise ram or swap backed page. Used by
15 * functions that manipulate the LRU lists, to sort a page onto the right LRU
18 * We would like to get this info without a page flag, but the state
19 * needs to survive until the page is last deleted from the LRU, which
22 static inline int page_is_file_lru(struct page *page) in page_is_file_lru() argument
24 return !PageSwapBacked(page); in page_is_file_lru()
48 static __always_inline void add_page_to_lru_list(struct page *page, in add_page_to_lru_list() argument
51 update_lru_size(lruvec, lru, page_zonenum(page), thp_nr_pages(page)); in add_page_to_lru_list()
52 list_add(&page->lru, &lruvec->lists[lru]); in add_page_to_lru_list()
55 static __always_inline void add_page_to_lru_list_tail(struct page *page, in add_page_to_lru_list_tail() argument
58 update_lru_size(lruvec, lru, page_zonenum(page), thp_nr_pages(page)); in add_page_to_lru_list_tail()
59 list_add_tail(&page->lru, &lruvec->lists[lru]); in add_page_to_lru_list_tail()
62 static __always_inline void del_page_from_lru_list(struct page *page, in del_page_from_lru_list() argument
65 list_del(&page->lru); in del_page_from_lru_list()
66 update_lru_size(lruvec, lru, page_zonenum(page), -thp_nr_pages(page)); in del_page_from_lru_list()
70 * page_lru_base_type - which LRU list type should a page be on?
71 * @page: the page to test
75 * Returns the base LRU type - file or anon - @page should be on.
77 static inline enum lru_list page_lru_base_type(struct page *page) in page_lru_base_type() argument
79 if (page_is_file_lru(page)) in page_lru_base_type()
85 * page_off_lru - which LRU list was page on? clearing its lru flags.
86 * @page: the page to test
88 * Returns the LRU list a page was on, as an index into the array of LRU
91 static __always_inline enum lru_list page_off_lru(struct page *page) in page_off_lru() argument
95 if (PageUnevictable(page)) { in page_off_lru()
96 __ClearPageUnevictable(page); in page_off_lru()
99 lru = page_lru_base_type(page); in page_off_lru()
100 if (PageActive(page)) { in page_off_lru()
101 __ClearPageActive(page); in page_off_lru()
109 * page_lru - which LRU list should a page be on?
110 * @page: the page to test
112 * Returns the LRU list a page should be on, as an index
115 static __always_inline enum lru_list page_lru(struct page *page) in page_lru() argument
119 if (PageUnevictable(page)) in page_lru()
122 lru = page_lru_base_type(page); in page_lru()
123 if (PageActive(page)) in page_lru()