mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: MGLRU: Avoid reactivation of anon pages on swap full
Avoid anon reclaim if swapping full since this reactivates the pages. Bug: 261619133 Bug: 276521916 Change-Id: Ia3af7fe8d5b29405830a812e73f95d11a0f8ee3a Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
committed by
Will Deacon
parent
340c38afcd
commit
b8d031e43c
@@ -2957,7 +2957,8 @@ static int get_swappiness(struct lruvec *lruvec, struct scan_control *sc)
|
||||
if (!sc->may_swap)
|
||||
return 0;
|
||||
|
||||
if (!can_demote(pgdat->node_id, sc))
|
||||
if (!can_demote(pgdat->node_id, sc) &&
|
||||
mem_cgroup_get_nr_swap_pages(memcg) <= 0)
|
||||
return 0;
|
||||
|
||||
return mem_cgroup_swappiness(memcg);
|
||||
|
||||
Reference in New Issue
Block a user