[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <q6ianzrub4plkvyhxqxy5zoqdweamccvvndnnsbfz3qho3ti2b@gmqmnuq2g6wh>
Date: Wed, 2 Apr 2025 09:01:59 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org, Rik van Riel <riel@...riel.com>,
Roman Gushchin <roman.gushchin@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
cgroups mailinglist <cgroups@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH] memcg, oom: do not bypass oom killer for dying tasks
On Wed, Apr 02, 2025 at 11:27:15AM -0400, Johannes Weiner wrote:
> On Wed, Apr 02, 2025 at 11:01:17AM +0200, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@...e.com>
> >
> > 7775face2079 ("memcg: killed threads should not invoke memcg OOM killer") has added
> > a bypass of the oom killer path for dying threads because a very
> > specific workload (described in the changelog) could hit "no killable
> > tasks" path. This itself is not fatal condition but it could be annoying
> > if this was a common case.
> >
> > On the other hand the bypass has some issues on its own. Without
> > triggering oom killer we won't be able to trigger async oom reclaim
> > (oom_reaper) which can operate on killed tasks as well as long as they
> > still have their mm available. This could be the case during futex
> > cleanup when the memory as pointed out by Johannes in [1]. The said case
> > is still not fully understood but let's drop this bypass that was mostly
> > driven by an artificial workload and allow dying tasks to go into oom
> > path. This will make the code easier to reason about and also help
> > corner cases where oom_reaper could help to release memory.
> >
> > [1] https://lore.kernel.org/all/20241212183012.GB1026@cmpxchg.org/T/#u
> >
> > Suggested-by: Johannes Weiner <hannes@...xchg.org>
> > Signed-off-by: Michal Hocko <mhocko@...e.com>
>
> Thanks, yeah, the investigation stalled out over the new years break
> and then... distractions.
>
> I think we'll eventually still need the second part of [2], to force
> charge from dying OOM victims, but let's go with this for now.
Agreed.
>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
>
> [2] https://lore.kernel.org/all/20241212183012.GB1026@cmpxchg.org/
>
Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
Powered by blists - more mailing lists