]> err.no Git - linux-2.6/commitdiff
[PATCH] zone_reclaim: do not unmap file backed pages
authorChristoph Lameter <clameter@engr.sgi.com>
Wed, 1 Feb 2006 11:05:32 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:15 +0000 (08:53 -0800)
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>
mm/vmscan.c

index 61ca0097c8343b4292bd6feb92660bc2870096de..8277f93148b508be9df7551639be735e5fe15ab8 100644 (file)
@@ -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;