Re: [PATCH] mm: memcontrol: don't miss processes whose leader has exited in OOM scans

From: Zhan Xusheng

Date: Fri Nov 13 2026 - 06:39:08 EST


Hi Michal,

On Fri, Nov 13, 2026 at 09:19:59AM +0100, Michal Hocko wrote:
> Do we have any conclusion on this?

No, Tejun has not commented.

The same case has come up for cgroup.kill since then. da13e0e72a73
("cgroup: fix cgroup.kill for exited thread group leader") in the
cgroup tree handles it by walking all threads instead of the leaders,
and leaves migration as it is. v2 does the same for the memcg scan,
so I would continue with it. Chris's "mm: memcontrol: Don't lose track
of exiting OOM victims" changes the same css_task_iter_start() call,
so v3 will be on top of it.

Tejun, if the exited leader should rather be moved along with its
threads, this patch is not needed.

Thanks,
Zhan Xusheng