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: Thu, 26 Sep 2013 09:38:42 +0800 [thread overview]
Message-ID: <52439022.9080407@windriver.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1309251056020.17676@chino.kir.corp.google.com>
On 09/26/2013 01:56 AM, David Rientjes wrote:
> On Wed, 25 Sep 2013, Ming Liu wrote:
>
>>> 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.
>>
> We never want to select a process where task->mm == init_mm because if we
> kill it we won't free any memory, regardless of vfork(). The goal of the
> oom killer is solely to free memory, so it always tries to avoid needless
> killing.
Yes, that make sense, I will send the V1 patch.
the best,
thank you
>
>
--
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>
WARNING: multiple messages have this Message-ID (diff)
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: Thu, 26 Sep 2013 09:38:42 +0800 [thread overview]
Message-ID: <52439022.9080407@windriver.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1309251056020.17676@chino.kir.corp.google.com>
On 09/26/2013 01:56 AM, David Rientjes wrote:
> On Wed, 25 Sep 2013, Ming Liu wrote:
>
>>> 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.
>>
> We never want to select a process where task->mm == init_mm because if we
> kill it we won't free any memory, regardless of vfork(). The goal of the
> oom killer is solely to free memory, so it always tries to avoid needless
> killing.
Yes, that make sense, I will send the V1 patch.
the best,
thank you
>
>
next prev parent reply other threads:[~2013-09-26 1:38 UTC|newest]
Thread overview: 10+ 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-23 9:45 ` Ming Liu
2013-09-25 2:34 ` David Rientjes
2013-09-25 2:34 ` David Rientjes
2013-09-25 5:49 ` Ming Liu
2013-09-25 5:49 ` Ming Liu
2013-09-25 17:56 ` David Rientjes
2013-09-25 17:56 ` David Rientjes
2013-09-26 1:38 ` Ming Liu [this message]
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=52439022.9080407@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.