lkml.org 
[lkml]   [2009]   [Jul]   [21]   [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, 21 Jul 2009, Paul Menage wrote:

> No, Rik's patch just fixes the lack of inheritability that David
> introduced originally. It doesn't address the problem that the
> intention of the patches is to disallow separate processes sharing the
> same VM from having different oom_adj scores, which breaks the
> previous ability to vfork() or clone(CLONE_VM) a child and set its
> oom_adj to a non-disabled value prior to execve().
>

That's exactly the scenario my patches were addressing, actually. It was
possible to get an oom killer livelock if a thread was constantly chosen
when sharing memory with an OOM_DISABLE task. So your example is a recipe
for livelock without my patches since the parent is OOM_DISABLE and the
child is not, yet they share an ->mm so neither can be killed. If the
child is repeatedly chosen prior to execve, no memory freeing is possible
unless another task happens to exceed the badness score of the child.


\
 
 \ /
  Last update: 2009-07-21 21:59    [W:0.056 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site