lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] copy over oom_adj value at fork time
On Tue, 14 Jul 2009, Paul Menage 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.

My patch to make oom_adj be a characteristic of the mm_struct and not the
task_struct makes it consistent, the scenario you describe above would
still have an OOM_DISABLE'd child even though /proc/pid-of-child/oom_adj
is not. That's the bug my patch addressed.

Without my change, the oom killer will endlessly loop if the child and not
the parent is chosen to be killed because parent->mm->oom_adj ==
OOM_DISABLE. The inheritance property is secondary to the semantics of
oom_adj and should be fixed with Rik's patch.


\
 
 \ /
  Last update: 2009-07-15 05:51    [W:0.072 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site