The patch titled Subject: mm,vmscan: only evict file pages when we have plenty has been added to the -mm tree. Its filename is mmvmscan-only-evict-file-pages-when-we-have-plenty.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Rik van Riel <riel@xxxxxxxxxx> Subject: 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@xxxxxxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff -puN mm/vmscan.c~mmvmscan-only-evict-file-pages-when-we-have-plenty mm/vmscan.c --- a/mm/vmscan.c~mmvmscan-only-evict-file-pages-when-we-have-plenty +++ a/mm/vmscan.c @@ -1686,6 +1686,15 @@ static void get_scan_count(struct lruvec fraction[1] = 0; denominator = 1; goto out; + } else if (!inactive_file_is_low_global(zone)) { + /* + * There is enough inactive page cache, do not + * reclaim anything from the working set right now. + */ + fraction[0] = 0; + fraction[1] = 1; + denominator = 1; + goto out; } } _ Patches currently in -mm which might be from riel@xxxxxxxxxx are linux-next.patch mm-vmscan-scale-number-of-pages-reclaimed-by-reclaim-compaction-only-in-direct-reclaim.patch mmvmscan-only-evict-file-pages-when-we-have-plenty.patch mmvmscan-only-evict-file-pages-when-we-have-plenty-fix.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html