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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Jul 2009 16:29:06 -0700
From:	Paul Menage <menage@...gle.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	rientjes@...gle.com, mel@....ul.ie, npiggin@...e.de
Subject: Re: [PATCH] copy over oom_adj value at fork time

On Tue, Jul 14, 2009 at 6:15 PM, Paul Menage<menage@...gle.com> wrote:
>
> But ironically, with this fix applied the main part of the original
> change (force all threads in a process to share a single oom_adj
> value) will start to break my code - it's no longer possible to have
> the regular threads in a process be oom-immune, then vfork() and set a
> non-disabled oom_adj in the child, since this will set it for the
> entire process. (Our job scheduler does something like this, in order
> to have the launcher be OOM immune and the running jobs be at various
> oom_adj levels depending on their priority).
>

How about if instead of having the oom_adj be per-mm, we kept an array
of counters in the mm, tracking how many users were at each oom_adj
level; the OOM killer could then use the level of the mm's highest
oom_adj user when deciding how to calculate the badness of a thread
using that mm.

That would preserve the previous semantics of letting a spawned child
inherit a per-thread oom_adj value, while avoiding the specific
problem of the OOM killer getting livelocked (that David's patch
originally addressed) and the more general case of the inconsistency
in determining the oom_adj level of an mm depending on which thread
you look at.

For the very common case where all users of the mm are at the same
oom_adj level, this array could be left unallocated as NULL, and the
thread's own oom_adj used.

Paul
--
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