]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
vmscan: add newly swapped in pages to the inactive list
authorRik van Riel <riel@redhat.com>
Sun, 19 Oct 2008 03:26:36 +0000 (20:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Oct 2008 15:50:25 +0000 (08:50 -0700)
Swapin_readahead can read in a lot of data that the processes in memory
never need.  Adding swap cache pages to the inactive list prevents them
from putting too much pressure on the working set.

This has the potential to help the programs that are already in memory,
but it could also be a disadvantage to processes that are trying to get
swapped in.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swap_state.c

index ea62084ed402aa1b64fa964513605b7738fb91f2..43cda7b4b808b3d666f6663c644d0ba894740261 100644 (file)
@@ -310,7 +310,7 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
                        /*
                         * Initiate read into locked page and return.
                         */
-                       lru_cache_add_active_anon(new_page);
+                       lru_cache_add_anon(new_page);
                        swap_readpage(NULL, new_page);
                        return new_page;
                }