summaryrefslogtreecommitdiff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2014-04-11 17:26:15 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:03:26 -0700
commit585690954ef42cfcda9357a37b6e9e8ccdd33d7c (patch)
tree6308cd09de30bc69337fbee92f0ef8342f11a56b /mm/vmscan.c
parent80370b5f592b4ee469f23447e1517cd78d0860ef (diff)
mm: vmscan: support equal reclaim for anon and file pages
When performing memory reclaim support treating 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. CRs-Fixed: 648984 Change-Id: I6315b8557020d1e27a34225bb9cefbef1fb43266 Signed-off-by: Liam Mark <lmark@codeaurora.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3b951836c6c8..9f844e8b92df 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2094,7 +2094,8 @@ static void get_scan_count(struct lruvec *lruvec, int swappiness,
* 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;
}