mm, memcg: do not retry precharge charges
Subsystems (2)
[email protected]
maintainerPATCH 10/26 mm, memcg: do not retry precharge charges
From: David Rientjes <[email protected]>
Subject: mm, memcg: do not retry precharge charges
When memory.move_charge_at_immigrate is enabled and precharges are depleted during move, mem_cgroup_move_charge_pte_range() will attempt to increase the size of the precharge.
Prevent precharges from ever looping by setting __GFP_NORETRY. This was probably the intention of the GFP_KERNEL & ~__GFP_NORETRY, which is pointless as written.
Fixes 0029e19ebf84 ("mm: memcontrol: remove explicit OOM parameter in charge path")
Signed-off-by David Rientjes <[email protected]>
Acked-by Michal Hocko <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Vladimir Davydov <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcg-do-not-retry-precharge-charges +2 -2
@@ -4353,9 +4353,9 @@ static int mem_cgroup_do_precharge(unsigreturn ret; } -/* Try charges one by one with reclaim */ +/* Try charges one by one with reclaim, but do not retry */ while (count--) { - ret =try_charge (mc.to,GFP_KERNEL & ~__GFP_NORETRY,1 ); + ret =try_charge (mc.to,GFP_KERNEL | __GFP_NORETRY,1 );if (ret)return ret; mc.precharge++;
_