From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by kanga.kvack.org (Postfix) with ESMTP id 8C6D89000BD for ; Mon, 26 Sep 2011 04:57:09 -0400 (EDT) Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p8Q8v74L019921 for ; Mon, 26 Sep 2011 01:57:07 -0700 Received: from ywa6 (ywa6.prod.google.com [10.192.1.6]) by hpaq5.eem.corp.google.com with ESMTP id p8Q8udYj015407 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 26 Sep 2011 01:57:05 -0700 Received: by ywa6 with SMTP id 6so4214023ywa.3 for ; Mon, 26 Sep 2011 01:57:00 -0700 (PDT) Date: Mon, 26 Sep 2011 01:56:57 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH 1/2] oom: do not live lock on frozen tasks In-Reply-To: <20110926082837.GC10156@tiehlicka.suse.cz> Message-ID: References: <20110825091920.GA22564@tiehlicka.suse.cz> <20110825151818.GA4003@redhat.com> <20110825164758.GB22564@tiehlicka.suse.cz> <20110826070946.GA7280@tiehlicka.suse.cz> <20110826085610.GA9083@tiehlicka.suse.cz> <20110826095356.GB9083@tiehlicka.suse.cz> <20110926082837.GC10156@tiehlicka.suse.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Oleg Nesterov , Konstantin Khlebnikov , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, KOSAKI Motohiro , KAMEZAWA Hiroyuki , "Rafael J. Wysocki" , Tejun Heo , Rusty Russell On Mon, 26 Sep 2011, Michal Hocko wrote: > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index 626303b..b9774f3 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > > int sysctl_panic_on_oom; > int sysctl_oom_kill_allocating_task; > @@ -451,6 +452,9 @@ static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem) > task_pid_nr(q), q->comm); > task_unlock(q); > force_sig(SIGKILL, q); > + > + if (frozen(q)) > + thaw_process(q); > } > > set_tsk_thread_flag(p, TIF_MEMDIE); This is in the wrong place, oom_kill_task() iterates over all threads that are _not_ in the same thread group as the chosen thread and kills them without giving them access to memory reserves. The chosen task, p, could still be frozen and may not exit. Once that's fixed, feel free to add my Acked-by: David Rientjes once Rafael sends his acked-by or reviewed-by. -- 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: email@kvack.org