Re: Improving OOM killer

From: KAMEZAWA Hiroyuki
Date: Tue Feb 02 2010 - 20:56:14 EST


On Tue, 2 Feb 2010 17:41:41 -0800 (PST)
David Rientjes <rientjes@xxxxxxxxxx> wrote:

> On Tue, 2 Feb 2010, Lubos Lunak wrote:
>
> > > > init
> > > > |- kdeinit
> > > > | |- ksmserver
> > > > | | |- kwin
> > > > | |- <other>
> > > > |- konsole
> > > > |- make
> > > > |- sh
> > > > | |- meinproc4
> > > > |- sh
> > > > | |- meinproc4
> > > > |- <etc>
> > > >
> > > > What happens is that OOM killer usually selects either ksmserver (KDE
> > > > session manager) or kdeinit (KDE master process that spawns most KDE
> > > > processes). Note that in either case OOM killer does not reach the point
> > > > of killing the actual offender - it will randomly kill in the tree under
> > > > kdeinit until it decides to kill ksmserver, which means terminating the
> > > > desktop session. As konsole is a KUniqueApplication, it forks into
> > > > background and gets reparented to init, thus getting away from the
> > > > kdeinit subtree. Since the memory pressure is distributed among several
> > > > meinproc4 processes, the badness does not get summed up in its make
> > > > grandparent, as badness() does this only for direct parents.
> > >
> > > There's no randomness involved in selecting a task to kill;
> >
> > That was rather a figure of speech, but even if you want to take it
> > literally, then from the user's point of view it is random. Badness of
> > kdeinit depends on the number of children it has spawned, badness of
> > ksmserver depends for example on the number and size of windows open (as its
> > child kwin is a window and compositing manager).
> >
>
> As I've mentioned, I believe Kame (now cc'd) is working on replacing the
> heuristic that adds the VM size for children into the parent task's
> badness score with a forkbomb detector.

I stopped that as I mentioned. I'm heavily disappointed with myself and
would like not to touch oom-killer things for a while.

I'd like to conentrate on memcg for a while, which I've starved for these 3 months.

Then, you don't need to CC me.

Bye,
-Kame

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