From: Ming Liu <ming.liu@windriver.com>
To: David Rientjes <rientjes@google.com>
Cc: akpm@linux-foundation.org, mhocko@suse.cz, rusty@rustcorp.com.au,
hannes@cmpxchg.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] oom: avoid killing init if it assume the oom killed thread's mm
Date: Wed, 25 Sep 2013 13:49:36 +0800 [thread overview]
Message-ID: <52427970.8010905@windriver.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1309241933590.26187@chino.kir.corp.google.com>
On 09/25/2013 10:34 AM, David Rientjes wrote:
> On Mon, 23 Sep 2013, Ming Liu wrote:
>
>> After selecting a task to kill, the oom killer iterates all processes and
>> kills all other user threads that share the same mm_struct in different
>> thread groups.
>>
>> But in some extreme cases, the selected task happens to be a vfork child
>> of init process sharing the same mm_struct with it, which causes kernel
>> panic on init getting killed. This panic is observed in a busybox shell
>> that busybox itself is init, with a kthread keeps consuming memories.
>>
> We shouldn't be selecting a process where mm == init_mm in the first
> place, so this wouldn't fix the issue entirely.
But if we add a control point for "mm == init_mm" in the first place(ie.
in oom_unkillable_task), that would forbid the processes sharing mm with
init to be selected, is that reasonable? Actually my fix is just to
protect init process to be killed for its vfork child being selected and
I think it's the only place where there is the risk. If my understanding
is wrong, pls correct me.
Thanks,
Ming Liu
>
>
--
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:[~2013-09-25 5:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 9:45 [PATCH] oom: avoid killing init if it assume the oom killed thread's mm Ming Liu
2013-09-25 2:34 ` David Rientjes
2013-09-25 5:49 ` Ming Liu [this message]
2013-09-25 17:56 ` David Rientjes
2013-09-26 1:38 ` Ming Liu
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=52427970.8010905@windriver.com \
--to=ming.liu@windriver.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
/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;
as well as URLs for NNTP newsgroup(s).