Re: [why oom_adj does not work] Re: Linux killed Kenny, bastard!

From: David Rientjes
Date: Tue Jan 13 2009 - 14:47:01 EST


On Tue, 13 Jan 2009, Evgeniy Polyakov wrote:

> Using oom_adj? Because there is no way I can determine which number to
> put there. It is not even documented for those who do not read kernel
> sources. Even after that: oom_score changes with time, and having 1/2 or
> 8 oom_adj is correct right now, it will not be in a few moments.
>

Your oom_adj scores should never need to be changed unless you're tuning
the inherited value of a child; it simply represents your input into when
a specific task should be considered rogue enough to target.

However, patches to improve the documentation of the oom killer, or any
other kernel feature, are always welcome.

> > You can replace the lines of kernel code you wrote with a simple
> > one-line script that Alan sent out.
>
> Almost. But I can not if tasks are spawned from the parent process. We
> can not change the process to adjust its forked children to have
> different adjustment and can not change it for the process itself, since
> it should live and children should be dead.
>

Children are already preferred over the chosen parent task, as I've
explained a few times. When a task is identified for oom kill by the
badness heuristics, the oom killer attempts to kill a child that does not
share the same mm first, which is exactly what you're asking for here. If
the parent shares the mm, it needs to exit as well before memory freeing
may occur.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/