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

Commit b066272d authored by Patrick Daly's avatar Patrick Daly Committed by Swathi Sridhar
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>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
[swatsrid@codeaurora.org: Fix trivial merge conflicts]
Signed-off-by: default avatarSwathi Sridhar <swatsrid@codeaurora.org>
parent 37b60809
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -651,6 +651,15 @@ config MAX_STACK_SIZE_MB

	  A sane initial value is 80 MB.

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.

config DEFERRED_STRUCT_PAGE_INIT
	bool "Defer initialisation of struct pages to kthreads"
	default n
+2 −1
Original line number Diff line number Diff line
@@ -2377,7 +2377,8 @@ static void get_scan_count(struct lruvec *lruvec, struct mem_cgroup *memcg,
	 * lruvec even if it has plenty of old anonymous pages unless the
	 * system is under heavy pressure.
	 */
	if (!inactive_list_is_low(lruvec, true, memcg, sc, false) &&
	if (!IS_ENABLED(CONFIG_BALANCE_ANON_FILE_RECLAIM) &&
	    !inactive_list_is_low(lruvec, true, memcg, sc, false) &&
	    lruvec_lru_size(lruvec, LRU_INACTIVE_FILE, sc->reclaim_idx) >> sc->priority) {
		scan_balance = SCAN_FILE;
		goto out;