Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756366AbZANTW2 (ORCPT ); Wed, 14 Jan 2009 14:22:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753976AbZANTWU (ORCPT ); Wed, 14 Jan 2009 14:22:20 -0500 Received: from intermatrixgroup.ru ([195.178.208.66]:43498 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753422AbZANTWT (ORCPT ); Wed, 14 Jan 2009 14:22:19 -0500 Date: Wed, 14 Jan 2009 22:22:16 +0300 From: Evgeniy Polyakov To: Bodo Eggert <7eggert@gmx.de> Cc: Alan Cox , Dave Jones , linux-kernel@vger.kernel.org, Andrew Morton , Linus Torvalds Subject: Re: [why oom_adj does not work] Re: Linux killed Kenny, bastard! Message-ID: <20090114192216.GA18123@ioremap.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1231 Lines: 28 On Wed, Jan 14, 2009 at 08:18:49PM +0100, Bodo Eggert (7eggert@gmx.de) wrote: > > Mwahaha, I just checked how scores are calculated, so that userspace > > could adjust them. Let's start with beginning: > > [snip] > > > Do you _REALLY_ think anyone can calculate it yourself and then properly > > calculate adjustment used to properly select oom-killed process? > > That's easy: Just let your Kenny process run, and check it's score. If it's > too low, increase the adjustment until it's just above the other processes' > score. Using binary search, you're done in five steps. > > Then, while you're at it, protect the important programs by setting > their adjustment to -17. This does not work if processes are short-living and are spawned by the parent on demand. If processes have different priority in regards to oom condition, this problem can not be solved with existing interfaces without changing the application. So effectively there is no solution. -- Evgeniy Polyakov -- 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/