*参照元 [#e98b9f19] #backlinks *説明 [#p175741b] -パス: [[linux-2.6.33/mm/vmscan.c]] -指定したページが排除可能かどうかを判断する。 **引数 [#zcb085c3] -struct page *page --排除可能かどうか判断するページ。 --[[linux-2.6.33/page]] -struct vm_area_struct *vma -- --[[linux-2.6.33/vm_area_struct]] **返り値 [#b7703498] -int --排除可能ならば 1、そうでなければ 0 **参考 [#s0077e72] *実装 [#n69de896] /* * 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; - --[[linux-2.6.33/mapping_unevictable()]] - --[[linux-2.6.33/page_mapping()]] if (PageMlocked(page) || (vma && is_mlocked_vma(vma, page))) return 0; - --[[linux-2.6.33/PageMlocked()]] - --[[linux-2.6.33/is_mlocked_vma()]] return 1; } *コメント [#tcae2873]