From: Oleg Nesterov <oleg@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org
Subject: Re: [patch resend] oom: thaw threads if oom killed thread is frozen before deferring
Date: Tue, 11 Oct 2011 21:16:03 +0200 [thread overview]
Message-ID: <20111011191603.GA12751@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1110071954040.13992@chino.kir.corp.google.com>
I guess this patch doesn't need my ack, but just in case, I think it is
fine. Even if (perhaps) we can do something better later, with the upcoming
changes in refrigerator.
David. Could you also resend you patches which remove the (imho really
annoying) mm->oom_disable_count? Feel free to add my ack or reviewed-by.
Oleg.
On 10/07, David Rientjes wrote:
>
> If a thread has been oom killed and is frozen, thaw it before returning
> to the page allocator. Otherwise, it can stay frozen indefinitely and
> no memory will be freed.
>
> Reported-by: Michal Hocko <mhocko@suse.cz>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
> mm/oom_kill.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -318,8 +318,11 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
> * blocked waiting for another task which itself is waiting
> * for memory. Is there a better alternative?
> */
> - if (test_tsk_thread_flag(p, TIF_MEMDIE))
> + if (test_tsk_thread_flag(p, TIF_MEMDIE)) {
> + if (unlikely(frozen(p)))
> + thaw_process(p);
> return ERR_PTR(-1UL);
> + }
> if (!p->mm)
> continue;
>
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-10-11 19:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 2:56 [patch resend] oom: thaw threads if oom killed thread is frozen before deferring David Rientjes
2011-10-08 2:59 ` [patch v2] " David Rientjes
2011-10-08 7:23 ` KOSAKI Motohiro
2011-10-11 6:33 ` Michal Hocko
2011-10-11 14:50 ` KOSAKI Motohiro
2011-10-11 15:14 ` Michal Hocko
2011-10-11 15:57 ` KOSAKI Motohiro
2011-10-11 19:07 ` Michal Hocko
2011-10-11 23:36 ` David Rientjes
2011-10-11 23:39 ` Tejun Heo
2011-10-11 23:46 ` David Rientjes
2011-10-12 6:50 ` Michal Hocko
2011-10-12 6:58 ` Michal Hocko
2011-10-11 19:16 ` Oleg Nesterov [this message]
2011-10-11 23:30 ` [patch resend] " David Rientjes
2011-10-11 23:41 ` Andrew Morton
2011-10-12 14:40 ` Oleg Nesterov
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=20111011191603.GA12751@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=rientjes@google.com \
--cc=rjw@sisk.pl \
/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).