Re: Linux 2.6.9-ac16
From: Thomas Gleixner
Date: Sat Dec 18 2004 - 01:02:33 EST
On Fri, 2004-12-17 at 16:45 +0100, Chris Ross wrote:
> Hi Chris,
> Chris Friesen escreveu:
> > As it stands, 2.6.10-rc2-mm4 still shows nasty behaviour in OOM
> > conditions, killing off more tasks than strictly required, and
> > locking up the system for 10-15secs while doing it.
> > I'd be much happier doing a quick and dirty scan and knocking off
> > something *now* rather than locking up the system. Surely it can't
> > take 60 billion cycles of cpu time to pick a task to kill.
> Thomas Gleixner has been particularly interested the algorithms for
> deciding which task to kill (like me he got fed up with it picking the
> ssh daemon first).
> See for example the thread at
> Some of the delay is by design: when OOM is reached we kill something
> off, wait a bit for the memory to be freed and become available to the
> system again, check whether now have enough memory, if not rinse and
> repeat. However, as I recall this is compounded by 2.6.9 having some
> nasty rentrancy problems causing the OOM killer to be called something
> like 100 times instead of once.
> Perhaps Thomas could enlighten us as to the current state of play here?
Andrea fixed the invocation problem, which also handles the reentrancy
problem in a clean way. It get's us rid of the ugly count, time,
whatever mechanisms in out_of_memory which was designed to cover the
invocation problem but was not able to prevent reentrancy and the
resulting overkill (kill a random amount of processes even if enough
memory is available).
I added the "Take child processes into account" modification for the
whom to kill selection on top of that and I was not able to make it
missbehave with my different test scenarios.
The patches are available in parts in this thread and the final combined
patch is there:
2.6.10-rc3 contains a partial fix for the erroneous invocation problem,
but it is not as effective as Andrea's solution and it still runs into
overkill once the oom mechanism is invoked.
Andrea's fix and the selection changes should go into 2.6.10, but I
suspect that the VM gurus havent still reached a point, where they
agree. I also have the feeling that the problem is partially ignored.
Obviously has everybody plenty of memory in his boxes. </rant off>
Andrea's fix revealed some GFP_ flag related problems, which should be
addressed seperately. Detailed explanation is in the mail thread.
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/