Messages in this thread Patch in this message | | | From | "Chris Swiedler" <> | Subject | [PATCH] bugfix in oom_kill.c | Date | Tue, 14 Nov 2000 12:22:49 -0500 |
| |
This patch fixes a bug in oom_kill. The way it was written, the OOM killer would try to kill the idle task if the task selected immediately before it had the most "badness". Probably because of the order of for_each_task(), this wouldn't ever happen, but I don't think we want to depend on that.
chris
--- official/linux-2.4.0/mm/oom_kill.c Mon Nov 6 23:53:01 2000 +++ work/linux-2.4.0-test10/mm/oom_kill.c Thu Nov 9 23:12:10 2000 @@ -124,11 +143,12 @@ read_lock(&tasklist_lock); for_each_task(p) { - if (p->pid) + if (p->pid) { points = badness(p); - if (points > maxpoints) { - chosen = p; - maxpoints = points; + if (points > maxpoints) { + chosen = p; + maxpoints = points; + } } } read_unlock(&tasklist_lock); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |