参照元†
- struct page *page
- struct vm_area_struct *vma
返り値†
/*
* page_evictable - test whether a page is evictable
* @page: the page to test
* @vma: the VMA in which the page is or will be mapped, may be NULL
*
* Test whether page is evictable--i.e., should be placed on active/inactive
* lists vs unevictable list. The vma argument is !NULL when called from the
* fault path to determine how to instantate a new page.
*
* Reasons page might not be evictable:
* (1) page's mapping marked unevictable
* (2) page is part of an mlocked VMA
*
*/
int page_evictable(struct page *page, struct vm_area_struct *vma)
{
if (mapping_unevictable(page_mapping(page)))
return 0;
if (PageMlocked(page) || (vma && is_mlocked_vma(vma, page)))
return 0;
return 1;
}
コメント†