mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-19 03:10:33 +00:00
define page_file_cache() function
Define page_file_cache() function to answer the question: is page backed by a file? Originally part of Rik van Riel's split-lru patch. Extracted to make available for other, independent reclaim patches. Moved inline function to linux/mm_inline.h where it will be needed by subsequent "split LRU" and "noreclaim" patches. Unfortunately this needs to use a page flag, since the PG_swapbacked state needs to be preserved all the way to the point where the page is last removed from the LRU. Trying to derive the status from other info in the page resulted in wrong VM statistics in earlier split VM patchsets. The total number of page flags in use on a 32 bit machine after this patch is 19. [akpm@linux-foundation.org: fix up out-of-order merge fallout] [hugh@veritas.com: splitlru: shmem_getpage SetPageSwapBacked sooner[ Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Signed-off-by: MinChan Kim <minchan.kim@gmail.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
68a22394c2
commit
b2e185384f
@@ -462,6 +462,8 @@ static inline int free_pages_check(struct page *page)
|
||||
bad_page(page);
|
||||
if (PageDirty(page))
|
||||
__ClearPageDirty(page);
|
||||
if (PageSwapBacked(page))
|
||||
__ClearPageSwapBacked(page);
|
||||
/*
|
||||
* For now, we report if PG_reserved was found set, but do not
|
||||
* clear it, and do not free the page. But we shall soon need
|
||||
|
||||
Reference in New Issue
Block a user