From: Rik van Riel Date: Wed, 12 Dec 2012 00:01:10 +0000 (-0800) Subject: mm,vmscan: only evict file pages when we have plenty X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~81^2~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9868505987a03a26a3979f27b82911ccc003752;p=pandora-kernel.git 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. [akpm@linux-foundation.org: adjust comment layout] Signed-off-by: Rik van Riel Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed