]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita7425e884e34df8f27786f7ae5e1c362fbfbe18f
treef1ac66e22e172945f200f1b2fd9a2ece23a0880b
parentcc61265cc7dc6da225ad4a5d4f13bc323d22673f
mm: don't free swap slots on page deactivation

The pagevec_swap_free() at the end of shrink_active_list() was introduced
in 2367b3e5 "vmscan: free swap space on swap-in/activation" when
shrink_active_list() was still rotating referenced active pages.

In ca54ec9 "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 ca54ec9 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