Lines Matching refs:page
98 …vm_area_struct* vma, unsigned long address, pte_t * page_table, struct page *page, zone_t * classz… in try_to_swap_out() argument
105 mark_page_accessed(page); in try_to_swap_out()
110 if (PageActive(page)) in try_to_swap_out()
114 if (!memclass(page_zone(page), classzone)) in try_to_swap_out()
117 if (TryLockPage(page)) in try_to_swap_out()
130 set_page_dirty(page); in try_to_swap_out()
137 if (PageSwapCache(page)) { in try_to_swap_out()
138 entry.val = page->index; in try_to_swap_out()
144 UnlockPage(page); in try_to_swap_out()
146 int freeable = page_count(page) - !!page->buffers <= 2; in try_to_swap_out()
147 page_cache_release(page); in try_to_swap_out()
166 if (page->mapping) in try_to_swap_out()
168 if (!PageDirty(page)) in try_to_swap_out()
175 if (page->buffers) in try_to_swap_out()
192 if (add_to_swap_cache(page, entry) == 0) { in try_to_swap_out()
193 SetPageUptodate(page); in try_to_swap_out()
194 set_page_dirty(page); in try_to_swap_out()
204 UnlockPage(page); in try_to_swap_out()
230 struct page *page = pte_page(*pte); in swap_out_pmd() local
232 if (VALID_PAGE(page) && !PageReserved(page)) { in swap_out_pmd()
233 count -= try_to_swap_out(mm, vma, address, pte, page, classzone); in swap_out_pmd()
397 struct page * page; in shrink_cache() local
407 page = list_entry(entry, struct page, lru); in shrink_cache()
409 BUG_ON(!PageLRU(page)); in shrink_cache()
410 BUG_ON(PageActive(page)); in shrink_cache()
419 if (unlikely(!page_count(page))) in shrink_cache()
422 if (!memclass(page_zone(page), classzone)) in shrink_cache()
428 if (!page->buffers && (page_count(page) != 1 || !page->mapping)) in shrink_cache()
435 if (unlikely(TryLockPage(page))) { in shrink_cache()
436 if (PageLaunder(page) && (gfp_mask & __GFP_FS)) { in shrink_cache()
437 page_cache_get(page); in shrink_cache()
439 wait_on_page(page); in shrink_cache()
440 page_cache_release(page); in shrink_cache()
446 if (PageDirty(page) && is_page_cache_freeable(page) && page->mapping) { in shrink_cache()
455 int (*writepage)(struct page *); in shrink_cache()
457 writepage = page->mapping->a_ops->writepage; in shrink_cache()
459 ClearPageDirty(page); in shrink_cache()
460 SetPageLaunder(page); in shrink_cache()
461 page_cache_get(page); in shrink_cache()
464 writepage(page); in shrink_cache()
465 page_cache_release(page); in shrink_cache()
477 if (page->buffers) { in shrink_cache()
481 page_cache_get(page); in shrink_cache()
483 if (try_to_release_page(page, gfp_mask)) { in shrink_cache()
484 if (!page->mapping) { in shrink_cache()
492 UnlockPage(page); in shrink_cache()
493 __lru_cache_del(page); in shrink_cache()
496 page_cache_release(page); in shrink_cache()
507 page_cache_release(page); in shrink_cache()
513 UnlockPage(page); in shrink_cache()
514 page_cache_release(page); in shrink_cache()
531 if (!page->mapping || page_count(page) > 1) { in shrink_cache()
533 UnlockPage(page); in shrink_cache()
560 if (PageDirty(page)) { in shrink_cache()
562 UnlockPage(page); in shrink_cache()
566 __lru_cache_del(page); in shrink_cache()
569 if (likely(!PageSwapCache(page))) { in shrink_cache()
570 __remove_inode_page(page); in shrink_cache()
574 swap.val = page->index; in shrink_cache()
575 __delete_from_swap_cache(page); in shrink_cache()
580 UnlockPage(page); in shrink_cache()
583 page_cache_release(page); in shrink_cache()
611 struct page * page; in refill_inactive() local
613 page = list_entry(entry, struct page, lru); in refill_inactive()
615 if (PageTestandClearReferenced(page)) { in refill_inactive()
616 list_del(&page->lru); in refill_inactive()
617 list_add(&page->lru, &active_list); in refill_inactive()
623 del_page_from_active_list(page); in refill_inactive()
624 add_page_to_inactive_list(page); in refill_inactive()
625 SetPageReferenced(page); in refill_inactive()