Re: [PATCH] graceful out of memory handling

From: Bernd Paysan (bernd.paysan@gmx.de)
Date: Mon Feb 14 2000 - 08:27:26 EST


> The "free memory" thing was kind of a design mistake by me.
> It usually works great, but I can see it fail in a situation
> where we have a whole bunch of busy mmap()ed zones, or don't
> have swap, etc...

Hm, this would require perhaps some adjustments to calculate free vs. used
memory. The idea of my improvement of the algorithm is to have two limits,
one to kill with SIGTERM, and one to kill hard. Your new patch does the
"kill hard" one at the right place (when there's really no VM left), but the
graceful kill should happen before (the program can terminate gracefully, and
even has a bit of space left to do that - after a soft kill, the state and
the limit changes). Fortunately, most of the code is just the same (like
selecting the right process to kill).

> Good to hear that the old patch still works :)

Nah, it needed several adjustments over the time. Each time it was broken
I realized it by crashing my machine with an OOM condition ;-). The 2.3.x
kernels look somewhat different WRT memory management.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/

Sent through Global Message Exchange - http://www.gmx.net

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:27 EST