ANDROID: MGLRU: Avoid reactivation of anon pages on swap full
This is a combination of the following two commits:
ANDROID: MGLRU: Don't skip anon reclaim if swap low
MGLRU tries to avoid doing unnecessary anon reclaim work if swap is
low by checking if the available swap is less than the MIN_BATCH_SIZE
(256kB). This can lead to unintened consequences where PSI pressure is
less and LMKD doesn't wake up in time to avoid file cache thrashing.
Remove this check to preserve the old bahavior. This can be improved
later on once we have a low swap notification event from the kernel.
Bug:
268574308
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
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: I197513d50458f2b752957152ef67fe285c7bbaf4
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
[backport of the commit
0491ec319e940b68a1e94145a14e1c65915d7a45 from android13-5.15 branch]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>