Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756149Ab1DKV7S (ORCPT ); Mon, 11 Apr 2011 17:59:18 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:36547 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986Ab1DKV7R (ORCPT ); Mon, 11 Apr 2011 17:59:17 -0400 Date: Mon, 11 Apr 2011 14:58:32 -0700 From: Andrew Morton To: KOSAKI Motohiro Cc: Andrey Vagin , Minchan Kim , KAMEZAWA Hiroyuki , "Luis Claudio R. Goncalves" , LKML , linux-mm , David Rientjes , Oleg Nesterov , Linus Torvalds Subject: Re: [PATCH 2/4] remove boost_dying_task_prio() Message-Id: <20110411145832.ae133cf8.akpm@linux-foundation.org> In-Reply-To: <20110411143215.0074.A69D9226@jp.fujitsu.com> References: <20110411142949.006C.A69D9226@jp.fujitsu.com> <20110411143215.0074.A69D9226@jp.fujitsu.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1843 Lines: 52 On Mon, 11 Apr 2011 14:31:18 +0900 (JST) KOSAKI Motohiro wrote: > This is a almost revert commit 93b43fa (oom: give the dying > task a higher priority). > > The commit dramatically improve oom killer logic when fork-bomb > occur. But, I've found it has nasty corner case. Now cpu cgroup > has strange default RT runtime. It's 0! That said, if a process > under cpu cgroup promote RT scheduling class, the process never > run at all. hm. How did that happen? I thought that sched_setscheduler() modifies only a single thread, and that thread is in the process of exiting? > Eventually, kernel may hang up when oom kill occur. > I and Luis who original author agreed to disable this logic at > once. > > ... > > index 6a819d1..83fb72c1 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -84,24 +84,6 @@ static bool has_intersects_mems_allowed(struct task_struct *tsk, > #endif /* CONFIG_NUMA */ > > /* > - * If this is a system OOM (not a memcg OOM) and the task selected to be > - * killed is not already running at high (RT) priorities, speed up the > - * recovery by boosting the dying task to the lowest FIFO priority. > - * That helps with the recovery and avoids interfering with RT tasks. > - */ > -static void boost_dying_task_prio(struct task_struct *p, > - struct mem_cgroup *mem) > -{ > - struct sched_param param = { .sched_priority = 1 }; > - > - if (mem) > - return; > - > - if (!rt_task(p)) > - sched_setscheduler_nocheck(p, SCHED_FIFO, ¶m); > -} I'm rather glad to see that code go away though - SCHED_FIFO is dangerous... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/