Messages in this thread Patch in this message | | | From | KOSAKI Motohiro <> | Subject | [PATCH] Clear reference bit although page isn't mapped. | Date | Wed, 2 Dec 2009 11:55:27 +0900 (JST) |
| |
> btw, current shrink_active_list() have unnecessary page_mapping_inuse() call. > it prevent to drop page reference bit from unmapped cache page. it mean > we protect unmapped cache page than mapped page. it is strange.
How about this?
--------------------------------- SplitLRU VM replacement algorithm assume shrink_active_list() clear the page's reference bit. but unnecessary page_mapping_inuse() test prevent it.
This patch remove it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> --- mm/vmscan.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c index 00156f2..3e942b5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1347,8 +1347,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, } /* page_referenced clears PageReferenced */ - if (page_mapping_inuse(page) && - page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) { + if (page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) { nr_rotated++; /* * Identify referenced, file-backed active pages and -- 1.6.5.2
| |