From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 189136B0011 for ; Tue, 10 May 2011 19:41:52 -0400 (EDT) Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p4ANfm1Z029477 for ; Tue, 10 May 2011 16:41:48 -0700 Received: from pzk5 (pzk5.prod.google.com [10.243.19.133]) by kpbe11.cbf.corp.google.com with ESMTP id p4ANfkOc003222 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 10 May 2011 16:41:47 -0700 Received: by pzk5 with SMTP id 5so3480760pzk.3 for ; Tue, 10 May 2011 16:41:46 -0700 (PDT) Date: Tue, 10 May 2011 16:41:44 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH 4/4] oom: don't kill random process In-Reply-To: <20110510171800.16B7.A69D9226@jp.fujitsu.com> Message-ID: References: <20110509182110.167F.A69D9226@jp.fujitsu.com> <20110510171335.16A7.A69D9226@jp.fujitsu.com> <20110510171800.16B7.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: KOSAKI Motohiro Cc: CAI Qian , avagin@gmail.com, Andrey Vagin , Andrew Morton , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Minchan Kim , Hugh Dickins , Oleg Nesterov On Tue, 10 May 2011, KOSAKI Motohiro wrote: > CAI Qian reported oom-killer killed all system daemons in his > system at first if he ran fork bomb as root. The problem is, > current logic give them bonus of 3% of system ram. Example, > he has 16GB machine, then root processes have ~500MB oom > immune. It bring us crazy bad result. _all_ processes have > oom-score=1 and then, oom killer ignore process memroy usage > and kill random process. This regression is caused by commit > a63d83f427 (oom: badness heuristic rewrite). > > This patch changes select_bad_process() slightly. If oom points == 1, > it's a sign that the system have only root privileged processes or > similar. Thus, select_bad_process() calculate oom badness without > root bonus and select eligible process. > This second (and very costly) iteration is unnecessary if the range of oom scores is increased from 1000 to 10000 or 100000 as suggested in the previous patch. -- 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