Messages in this thread | | | Date | Tue, 14 Jul 2009 20:48:53 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [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.
| |