lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100211151135.91586cd1.akpm@linux-foundation.org>
Date:	Thu, 11 Feb 2010 15:11:35 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Rik van Riel <riel@...hat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Nick Piggin <npiggin@...e.de>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Lubos Lunak <l.lunak@...e.cz>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [patch 4/7 -mm] oom: badness heuristic rewrite

On Thu, 11 Feb 2010 14:42:39 -0800 (PST)
David Rientjes <rientjes@...gle.com> wrote:

> On Thu, 11 Feb 2010, Andrew Morton wrote:
> 
> > > Sigh, this is going to require the amount of system memory to be 
> > > partitioned into OOM_ADJUST_MAX, 15, chunks and that's going to be the 
> > > granularity at which we'll be able to either bias or discount memory usage 
> > > of individual tasks by: instead of being able to do this with 0.1% 
> > > granularity we'll now be limited to 100 / 15, or ~7%.  That's ~9GB on my 
> > > 128GB system just because this was originally a bitshift.  The upside is 
> > > that it's now linear and not exponential.
> > 
> > Can you add newly-named knobs (rather than modifying the existing
> > ones), deprecate the old ones and then massage writes to the old ones
> > so that they talk into the new framework?
> > 
> 
> That's what I was thinking, add /proc/pid/oom_score_adj that is just added 
> into the badness score (and is then exported with /proc/pid/oom_score) 
> like this patch did with oom_adj and then scale it into oom_adj units for 
> that tunable.  A write to either oom_adj or oom_score_adj would change the 
> other,

How ugly is all this?

> the same thing I did for /proc/sys/vm/dirty_{bytes,ratio} and
> /proc/sys/vm/dirty_background_{bytes,ratio} which I guess we have to 
> support forever since the predecessors are part of the ABI and there's no 
> way to deprecate them since they'll never be removed for that reason.

Ah, OK, I was trying to remember where we did that ;)

There _are_ things we can do though.  Detect a write to the old file and
emit a WARN_ON_ONCE("you suck").  Wait a year, turn it into
WARN_ON("you really suck").  Wait a year, then remove it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ