]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mm: don't free swap slots on page deactivation
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 31 Mar 2009 22:23:13 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:13 +0000 (08:59 -0700)
The pagevec_swap_free() at the end of shrink_active_list() was introduced
in 68a22394 "vmscan: free swap space on swap-in/activation" when
shrink_active_list() was still rotating referenced active pages.

In 7e9cd48 "vmscan: fix pagecache reclaim referenced bit check" this was
changed, the rotating removed but the pagevec_swap_free() after the
rotation loop was forgotten, applying now to the pagevec of the
deactivation loop instead.

Now swap space is freed for deactivated pages.  And only for those that
happen to be on the pagevec after the deactivation loop.

Complete 7e9cd48 and remove the rest of the swap freeing.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c

index 988aef9330161d60b29bffd0a0c2edbbcf7bc99c..e70fae31e9685bf79e4a88903650f3282e3fb484 100644 (file)
@@ -1303,9 +1303,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
        spin_unlock_irq(&zone->lru_lock);
        if (buffer_heads_over_limit)
                pagevec_strip(&pvec);
-       if (vm_swap_full())
-               pagevec_swap_free(&pvec);
-
        pagevec_release(&pvec);
 }