From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: akpm@linux-foundation.org
Cc: hannes@cmpxchg.org, mhocko@suse.com, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev,
penguin-kernel@i-love.sakura.ne.jp, tj@kernel.org,
mkoutny@suse.com, chris@chrisdown.name, cui.tao@linux.dev,
linux-mm@kvack.org, zhanxusheng@xiaomi.com
Subject: Re: [PATCH v3] mm: memcontrol: don't miss processes whose leader has exited in OOM scans
Date: Mon, 23 Nov 2026 17:33:10 +0800 [thread overview]
Message-ID: <20261123093310.1733660-1-zhanxusheng1024@gmail.com> (raw)
In-Reply-To: <sashiko-outbox-227786@kernel.org>
On Sun, Nov 22, 2026 at 07:32:46AM +0000, sashiko-bot@kernel.org wrote:
> Can mem_cgroup_scan_skip() expose an exiting thread left behind in the
> source memcg once the migrated threads in the destination memcg begin
> exiting?
Yes, but only once every thread that moved is exiting, so the process
is going away. The source scan then either backs off on an OOM victim
until MMF_OOM_SKIP, or selects the exiting process and sends SIGKILL to
a process that is dying anyway. Neither kills a live process, and the
charge is retried once the process is gone. Without this patch the
source scan sees the left-behind leader all the time, not only while
the process exits.
Counting exiting threads in other memcgs too would close it, but would
also hide an exiting group that cgroup v1 split across memcgs from all
of them, so a concurrent OOM there could kill another process instead
of waiting for it. I'd rather keep v3 as it is.
Thanks,
Zhan Xusheng
next prev parent reply other threads:[~2026-11-23 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 7:32 [PATCH v3] mm: memcontrol: don't miss processes whose leader has exited in OOM scans Zhan Xusheng
2026-11-22 7:32 ` sashiko-bot
2026-11-23 9:33 ` Zhan Xusheng [this message]
2026-11-23 10:11 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123093310.1733660-1-zhanxusheng1024@gmail.com \
--to=zhanxusheng1024@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chris@chrisdown.name \
--cc=cui.tao@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
--cc=zhanxusheng@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox