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

Skip to content
Commit f31b88c2 authored by Vinayak Menon's avatar Vinayak Menon Committed by Prakash Gupta
Browse files

mm: retry more before OOM in the presence of slow shrinkers



Shrinkers like lowmemorykiller makes the decision of killing tasks
based on cached levels and also whether previous killed tasks have
been reaped. This can delay the reclaim and by this time no progress
loops of should_reclaim_retry can reach max retries, thus resulting in
premature kills. How fast the no progress loops can complete depends on
cpu speed, thus retry until reclaimable pages are too less (when
__zone_watermark_ok of shouuld_reclaim_retry fails) in the case of slow
shrinkers. This fixes premature order 0 OOMs.
Now, for (0 < order < costly order) cases, should_reclaim_retry can bail
out fast. The decision to try should_compact_retry is based on progress
made in the previous reclaim. A single no progress reclaim can result in
OOMs for higher orders. Fix that too.

Change-Id: I189311e25fc663a2e27d4dc4a38b24024c4cd2a3
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent f3751611
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment