Lines Matching full:page

13  * page_is_file_lru - should the page be on a file LRU or anon LRU?
14 * @page: the page to test
16 * Returns 1 if @page is a regular filesystem backed page cache page or a lazily
17 * freed anonymous page (e.g. via MADV_FREE). Returns 0 if @page is a normal
18 * anonymous page, a tmpfs page or otherwise ram or swap backed page. Used by
19 * functions that manipulate the LRU lists, to sort a page onto the right LRU
22 * We would like to get this info without a page flag, but the state
23 * needs to survive until the page is last deleted from the LRU, which
26 static inline int page_is_file_lru(struct page *page) in page_is_file_lru() argument
28 return !PageSwapBacked(page); in page_is_file_lru()
52 static __always_inline void add_page_to_lru_list(struct page *page, in add_page_to_lru_list() argument
55 trace_android_vh_add_page_to_lrulist(page, false, lru); in add_page_to_lru_list()
56 update_lru_size(lruvec, lru, page_zonenum(page), thp_nr_pages(page)); in add_page_to_lru_list()
57 list_add(&page->lru, &lruvec->lists[lru]); in add_page_to_lru_list()
60 static __always_inline void add_page_to_lru_list_tail(struct page *page, in add_page_to_lru_list_tail() argument
63 trace_android_vh_add_page_to_lrulist(page, false, lru); in add_page_to_lru_list_tail()
64 update_lru_size(lruvec, lru, page_zonenum(page), thp_nr_pages(page)); in add_page_to_lru_list_tail()
65 list_add_tail(&page->lru, &lruvec->lists[lru]); in add_page_to_lru_list_tail()
68 static __always_inline void del_page_from_lru_list(struct page *page, in del_page_from_lru_list() argument
71 trace_android_vh_del_page_from_lrulist(page, false, lru); in del_page_from_lru_list()
72 list_del(&page->lru); in del_page_from_lru_list()
73 update_lru_size(lruvec, lru, page_zonenum(page), -thp_nr_pages(page)); in del_page_from_lru_list()
77 * page_lru_base_type - which LRU list type should a page be on?
78 * @page: the page to test
82 * Returns the base LRU type - file or anon - @page should be on.
84 static inline enum lru_list page_lru_base_type(struct page *page) in page_lru_base_type() argument
86 if (page_is_file_lru(page)) in page_lru_base_type()
92 * page_off_lru - which LRU list was page on? clearing its lru flags.
93 * @page: the page to test
95 * Returns the LRU list a page was on, as an index into the array of LRU
98 static __always_inline enum lru_list page_off_lru(struct page *page) in page_off_lru() argument
102 if (PageUnevictable(page)) { in page_off_lru()
103 __ClearPageUnevictable(page); in page_off_lru()
106 lru = page_lru_base_type(page); in page_off_lru()
107 if (PageActive(page)) { in page_off_lru()
108 __ClearPageActive(page); in page_off_lru()
116 * page_lru - which LRU list should a page be on?
117 * @page: the page to test
119 * Returns the LRU list a page should be on, as an index
122 static __always_inline enum lru_list page_lru(struct page *page) in page_lru() argument
126 if (PageUnevictable(page)) in page_lru()
129 lru = page_lru_base_type(page); in page_lru()
130 if (PageActive(page)) in page_lru()