On Tue, 2025-01-14 at 17:54 +0100, Michal Hocko wrote: > O > Btw. is there any actual reason why we cannot go nomem without going > to the oom killer (just to bail out) and go through the whole cycle > again? That seems arbitrary and simply burning a lot of cycle without > much chances to make any better outcome > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 7b3503d12aaf..eb45eaf0acfc 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -2268,8 +2268,7 @@ int try_charge_memcg(struct mem_cgroup *memcg, > gfp_t gfp_mask, > if (gfp_mask & __GFP_RETRY_MAYFAIL) > goto nomem; > > - /* Avoid endless loop for tasks bypassed by the oom killer > */ > - if (passed_oom && task_is_dying()) > + if (task_is_dying()) > goto nomem; > > /* When we return from the page fault handler, we restart the instruction that faulted. That means we could just end up repeating the same fault over and over again. -- All Rights Reversed.