Re: VM fixes [4/4]

From: Rik van Riel
Date: Mon Dec 27 2004 - 08:40:06 EST


On Fri, 24 Dec 2004, Andrea Arcangeli wrote:

--- x/mm/oom_kill.c.orig 2004-12-24 17:53:50.807536152 +0100
+++ x/mm/oom_kill.c 2004-12-24 18:01:19.903263224 +0100
@@ -45,18 +45,30 @@
unsigned long badness(struct task_struct *p, unsigned long uptime)
{

/*
+ * Processes which fork a lot of child processes are likely
+ * a good choice. We add the vmsize of the childs if they
+ * have an own mm. This prevents forking servers to flood the
+ * machine with an endless amount of childs
+ */

I'm not sure about this one. You'll end up killing the
parent httpd and sshd, instead of letting them hang around
so the system can recover by itself after the memory use
spike is over.

I guess it all depends on whether your OOM situation is a
spike or a deliberately caused problem...

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
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/