From aa3f18b3391ac305baa01faead3fdf9147daf54b Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 1 Feb 2006 03:05:32 -0800 Subject: [PATCH] zone_reclaim: do not unmap file backed pages zone_reclaim should leave that to the real swapper. We are only interested in evicting unmapped pages. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/vmscan.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mm') diff --git a/mm/vmscan.c b/mm/vmscan.c index 61ca0097c834..8277f93148b5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -477,6 +477,12 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) * processes. Try to unmap it here. */ if (page_mapped(page) && mapping) { + /* + * No unmapping if we do not swap + */ + if (!sc->may_swap) + goto keep_locked; + switch (try_to_unmap(page)) { case SWAP_FAIL: goto activate_locked; -- cgit v1.2.3