Merge "mm: vmscan: support equal reclaim for anon and file pages"

This commit is contained in:
Linux Build Service Account 2014-04-28 15:04:54 -07:00 committed by Gerrit - the friendly Code Review server
commit 39bb2cfbe1
2 changed files with 11 additions and 1 deletions

View file

@ -528,3 +528,12 @@ config ZSWAP
interactions don't cause any known issues on simple memory setups,
they have not be fully explored on the large set of potential
configurations and workloads that exist.
config BALANCE_ANON_FILE_RECLAIM
bool "During reclaim treat anon and file backed pages equally"
depends on SWAP
help
When performing memory reclaim treat anonymous and file backed pages
equally.
Swapping anonymous pages out to memory can be efficient enough to justify
treating anonymous and file backed pages equally.

View file

@ -1794,7 +1794,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
* There is enough inactive page cache, do not reclaim
* anything from the anonymous working set right now.
*/
if (!inactive_file_is_low(lruvec)) {
if (!IS_ENABLED(CONFIG_BALANCE_ANON_FILE_RECLAIM) &&
!inactive_file_is_low(lruvec)) {
scan_balance = SCAN_FILE;
goto out;
}