From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: mhocko@suse.com
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm,oom: Set ->signal->oom_mm to all thread groups sharing the victim's mm.
Date: Tue, 28 Nov 2017 23:07:26 +0900 [thread overview]
Message-ID: <201711282307.EBG97690.MQVOFLFFOJHtOS@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20171128130017.ma4qzyjay7p2zsbg@dhcp22.suse.cz>
Michal Hocko wrote:
> On Tue 28-11-17 21:41:28, Tetsuo Handa wrote:
> > Due to commit 696453e66630ad45 ("mm, oom: task_will_free_mem should skip
> > oom_reaped tasks") and patch "mm,oom: Use ALLOC_OOM for OOM victim's last
> > second allocation.", thread groups sharing the OOM victim's mm without
> > setting ->signal->oom_mm before task_will_free_mem(current) is called
> > might fail to try ALLOC_OOM allocation attempt.
>
> Look, this is getting insane. The code complexity grows without any
> real users asking for this.
This is the result of applying "mm,oom: Use ALLOC_OOM for OOM victim's
last second allocation." instead of "mm, oom: task_will_free_mem(current)
should ignore MMF_OOM_SKIP for once." More you go per-mm oriented rather
than per-signal oriented or per-thread oriented, more atomicity will be
needed.
> While this might look like an interesting
> excercise to you I really hate the direction you are heading. This code
> will always be just a heuristic and the more complicated it will be the
> bigger chances of other side effects there will be as well.
>
> So NACK to this unless I you can show a _real_ usecase that would
> _suffer_ by this corner case.
But we send SIGKILL to all thread groups sharing the OOM victim's memory.
This means that (though it might be artificial/malicious) there can be
programs which hit this corner case.
This resembles setting TIF_MEMDIE to all threads at mark_oom_victim(),
and (if I understand correctly) cgroup-aware OOM killer discussion is
after all trying to split oom_kill_process() into "printk()" part and
"non-printk()" part.
Also, please don't preserve outdated comments.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-11-28 14:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 12:41 Tetsuo Handa
2017-11-28 13:00 ` Michal Hocko
2017-11-28 14:07 ` Tetsuo Handa [this message]
2017-11-28 16:17 ` [PATCH v2] " Tetsuo Handa
2017-11-28 19:39 ` 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=201711282307.EBG97690.MQVOFLFFOJHtOS@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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