From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 860369000BD for ; Mon, 26 Sep 2011 04:35:59 -0400 (EDT) Date: Mon, 26 Sep 2011 10:35:55 +0200 From: Michal Hocko Subject: [PATCH 2/2] oom: give bonus to frozen processes Message-ID: <20110926083555.GD10156@tiehlicka.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Oleg Nesterov , Konstantin Khlebnikov , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, KOSAKI Motohiro , KAMEZAWA Hiroyuki , "Rafael J. Wysocki" On Fri 26-08-11 11:13:40, David Rientjes wrote: > On Fri, 26 Aug 2011, Michal Hocko wrote: [...] > > I am not saying the bonus is necessary, though. It depends on what > > the freezer is used for (e.g. freeze a process which went wild and > > debug what went wrong wouldn't welcome that somebody killed it or other > > (mis)use which relies on D state). [...] > If it actually does come down to a heuristic change, then it need not > happen in the oom killer: the freezing code would need to use > test_set_oom_score_adj() to temporarily reduce the oom_score_adj for that > task until it comes out of the refrigerator. We already use that in ksm > and swapoff to actually prefer threads, but we can use it to bias against > threads as well. Let's try it with a heuristic change first. If you really do not like it, we can move to oom_scode_adj. I like the heuristic change little bit more because it is at the same place as the root bonus. ---