2 add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l)
4 list_add(&page->lru, &zone->lru[l].list);
5 __inc_zone_state(zone, NR_LRU_BASE + l);
9 del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l)
12 __dec_zone_state(zone, NR_LRU_BASE + l);
16 add_page_to_active_list(struct zone *zone, struct page *page)
18 add_page_to_lru_list(zone, page, LRU_ACTIVE);
22 add_page_to_inactive_list(struct zone *zone, struct page *page)
24 add_page_to_lru_list(zone, page, LRU_INACTIVE);
28 del_page_from_active_list(struct zone *zone, struct page *page)
30 del_page_from_lru_list(zone, page, LRU_ACTIVE);
34 del_page_from_inactive_list(struct zone *zone, struct page *page)
36 del_page_from_lru_list(zone, page, LRU_INACTIVE);
40 del_page_from_lru(struct zone *zone, struct page *page)
42 enum lru_list l = LRU_INACTIVE;
45 if (PageActive(page)) {
46 __ClearPageActive(page);
49 __dec_zone_state(zone, NR_LRU_BASE + l);
53 * page_lru - which LRU list should a page be on?
54 * @page: the page to test
56 * Returns the LRU list a page should be on, as an index
57 * into the array of LRU lists.
59 static inline enum lru_list page_lru(struct page *page)
61 enum lru_list lru = LRU_BASE;