From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754661Ab0DBU6A (ORCPT ); Fri, 2 Apr 2010 16:58:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26427 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145Ab0DBU5x (ORCPT ); Fri, 2 Apr 2010 16:57:53 -0400 Date: Fri, 2 Apr 2010 22:55:35 +0200 From: Oleg Nesterov To: David Rientjes Cc: Andrew Morton , anfei , KOSAKI Motohiro , nishimura@mxp.nes.nec.co.jp, KAMEZAWA Hiroyuki , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch] oom: give current access to memory reserves if it has been killed Message-ID: <20100402205535.GA4842@redhat.com> References: <20100331175836.GA11635@redhat.com> <20100331204718.GD11635@redhat.com> <20100401135927.GA12460@redhat.com> <20100402111406.GA4432@redhat.com> <20100402191414.GA982@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02, David Rientjes wrote: > > On Fri, 2 Apr 2010, Oleg Nesterov wrote: > > > > > I prefer to keep oom_badness() to be a positive range as > > > it always has been (and /proc/pid/oom_score has always used an unsigned > > > qualifier), > > > > Yes, I thought about /proc/pid/oom_score, but imho this is minor issue. > > We can s/%lu/%ld/ though, or just report 0 if oom_badness() returns -1. > > Or something. > > Just have it return 0, meaning never kill, and then ensure "chosen" is > never set for an oom_badness() of 0, even if we don't have another task to > kill. That's how Documentation/filesystems/proc.txt describes it anyway. OK, agreed, this makes more sense and more clean. I misunderstood you even more before. Thanks, I'll redo/resend 3/4. Oleg.