]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm,vmscan: only evict file pages when we have plenty
authorRik van Riel <riel@redhat.com>
Fri, 9 Nov 2012 03:04:05 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 12 Nov 2012 04:16:57 +0000 (15:16 +1100)
commit1e4e249e3a9d2b4cb5e5843e9c9a90f6a20c0cfc
tree9c8edc1a07409d790b0e2cd3838b839d96c28e08
parent2e6234049eeb55ee39dc446c6de45b614b47cabc
mm,vmscan: only evict file pages when we have plenty

If we have more inactive file pages than active file pages, we skip
scanning the active file pages altogether, with the idea that we do not
want to evict the working set when there is plenty of streaming IO in the
cache.

However, the code forgot to also skip scanning anonymous pages in that
situation.  That leads to the curious situation of keeping the active file
pages protected from being paged out when there are lots of inactive file
pages, while still scanning and evicting anonymous pages.

This patch fixes that situation, by only evicting file pages when we have
plenty of them and most are inactive.

Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c