Re: oom() _still_ killing init

Urban Widmark (urban@svenskatest.se)
Fri, 18 Jun 1999 11:15:53 +0200 (CEST)


On Thu, 17 Jun 1999, Andrea Arcangeli wrote:

> My VM patches has nothing to do with the above patch. But incidentally the
> above patch will work _only_ with my vm patches because 2.2.x won't call
> oom() if the system goes OOM but it will silenty send a sigbus that may be
> trapped from a malicious user btw. (so in 2.2.x you should do the check
> for current->pid even in do_page_fault...)

No, the 2.2.x's does call oom() (at least for x < 10). This was discussed
before in the "Allocation of too much memory hangs system, kernel 2.2.*"
thread. I know I sent you (and everyone else on that Cc list) some of my
testresults, including, for 2.2.7:
...
Out of memory for init.
...

Your change and Rik's more advanced should work for the problem I have
generated with postgresql (one process that grows, should be max for you
and get the highest "Rik-badness" score)

Does Rik's patch also spare the X server?

There is something about not killing things with direct hardware access,
giving score of 0 to them, which is lower than root owned processes such
as init (with points >>= 2;).
Perhaps a special handling of some other processes should be added (init,
kflushd?, kpiod?, kswapd?, ...). 0 points does not mean that it can't be
killed, just that it will be killed last, right?

/Urban

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/