Skip to content

Commit

Permalink
[PATCH] zone_reclaim: do not unmap file backed pages
Browse files Browse the repository at this point in the history
zone_reclaim should leave that to the real swapper.  We are only interested
in evicting unmapped pages.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 1, 2006
1 parent 4e6a510 commit aa3f18b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa3f18b

Please sign in to comment.