★ wanayoo — archive 1999 http://www.kernelnotes.org/patch/21-p0614.htmlNouvelle recherche | Portail wanayoo

Out of memory problem Patch

Rauli Ruohonen (raulir@fishy.pp.sci.fi)
Wed Jul 2 13:09:00 1997

[Home] [Linux 2.0] [Linux 2.1] [Information] [Software] [Distributions] [Links]

2x-out-mem.patch
Here's a patch I came up with when I wanted to have more saner handling of out of memory conditions.. Do not use it in a production system, it's not "smart" now, and it probably contains many bugs, as this is a first patch I've ever tried to do. The algorithm to pick the process to be killed is NOT smart, I just wanted to do something to make it possible to *have* an algorithm instead of just semi-randomly killing processes.

There are many places where I'm unsure whether my changes are correct, and the "there's-always-memory" policy this patch uses is incorrect. It would be nice if somebody more experienced in kernel hacking could finish this, so *then* people could start arguing about the best algorithm(s) which could be then picked at compile/run-time. It could be completely tunable by user-mode programs, or use the original "algorithm", whatever.

This is for a 2.0.31-1, but maybe it applies to later kernels as well. If this kind of thing ever gets to the kernel, it should be in 2.1.x though.




[Home] [Up] [Search] [FeedBack]

Copyleft © The LinuxHQ Project. Licensed under the GNU Public License.