diff options
| author | Liam Mark <lmark@codeaurora.org> | 2014-04-11 17:26:15 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-10-21 15:08:10 +0200 |
| commit | 28d6ccb1dfd452d959bf5ca545b0d1b2fc65b463 (patch) | |
| tree | 246f685348adfca8e4d198843d58e7de0c27e37a /mm | |
| parent | 817d821abbf1d605512af53a10bc45d3da834cf5 (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')
| -rw-r--r-- | mm/Kconfig | 9 | ||||
| -rw-r--r-- | mm/vmscan.c | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index ba380e5c0..6ae2f341d 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -540,3 +540,12 @@ config ZBUD page. While this design limits storage density, it has simple and deterministic reclaim properties that make it preferable to a higher density approach when reclaim will be used. + +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. diff --git a/mm/vmscan.c b/mm/vmscan.c index 78df8fa4b..99e998177 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1956,7 +1956,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; } |
