Re: oom killer in 2.4.23

From: Andrea Arcangeli
Date: Thu Dec 04 2003 - 18:58:57 EST


On Thu, Dec 04, 2003 at 09:38:28PM +0100, Peter Bergmann wrote:
> > > effect is still unchanged.
> > > processes get killed by VM and not oom_kikll.c
> > >
> > > any hints ??
> >
> > You probably want to look at the change to
> > vmscan.c:try_to_free_pages_zone().
> >
> > --
> > Jens Axboe
>
> I did, but my vm knolege is rather limited.
> I don't really know really know _where_ to place
> out_of_memory() in the new try_to_free_pages_zone()...
> and what other changes would be necessary in vmscan.c.
>
> My try & error approach did not succeed.
>
> I would be really glad if someone (aa may be :) could
> provide the information where/how to place the call for a custom
> (or the old) oom killer - if it's really that simple ...

it's that simple to reenable it in 2.4.22 status, so if you're ok to
deadlock. 2.4.23 can't deadlock, it can live lock if you're unlucky with
timings yes (think if you add 32G of swap and your ram runs at 1k/sec
instead of 1G/sec), but not deadlock and it won't random kill tasks even
if it shouldn't to. deadlock is a bug, killing task despite there's ram
free is a bug, livelock is something you can avoid by dropping all swap.
if you drop all swap with 2.4.22 it'll go nuts killing tasks (see the
bugreports).

Since doing it right wasn't possible in 2.4, I dropped it years ago, -aa
users are w/o an oom killer for years and I never heard a single
complain. somebody asked why yes, but they were happy afterwards. I
don't think I asked Marcelo to merge it, I explained why I dropped it,
people sent him bugreports about the oom killer going nuts, and he
agreed my solution was the best short term w/o adding lots of effort to
make the oom killer right. Note the oom killer goes nuts in 2.6 too,
nobody did it right yet, that's why I don't think it's a 2.4 issue.

Marcelo asked me to to make it configurable at runtime so you could go
in the deadlock prone stautus of 2.4.22 on demand, but I'm not going to
add more features to 2.4 today unless they're blocker bugs (even if that
would be simple to implement), actually it's not even my choice so don't
ask me for that sorry.
-
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/