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

From: Evgeniy Polyakov
Date: Thu Jan 15 2009 - 03:43:41 EST


On Wed, Jan 14, 2009 at 04:54:09PM -0800, David Rientjes (rientjes@xxxxxxxxxx) wrote:
> > This does not work if processes are short-living and are spawned by the
> > parent on demand. If processes have different priority in regards to oom
> > condition, this problem can not be solved with existing interfaces
> > without changing the application. So effectively there is no solution.
> >
>
> Wrong, you can change how the application is forked. Either immediately
> adjust /proc/$!/oom_adj or use the adjustment inheritance property and
> change /proc/$$/oom_adj to the desired value prior to forking. Thanks.

You and Alan so like bash... Applications are not always forked from shell.

I already pointed multiple times where parent om_adj changes lead, and
that this does not work in a real world for some common cases. Existing
scheme only works if some daemon (or application itself) explicitely
changes oom_adj, but no dameon exists to monitor /proc and applications
do not change their own and child's oom_adj because it is way too
linuxish to add such hacks to deal with system's oom-killer, which can
not be properly configured otherwise.

--
Evgeniy Polyakov
--
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/