Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f5409c7 authored by Liam Mark's avatar Liam Mark
Browse files

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: default avatarLiam Mark <lmark@codeaurora.org>
parent 54f3fb1b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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.
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -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;
	}