Re: must-fix list for 2.6.0

William Lee Irwin III (wli@holomorphy.com)
Wed, 30 Apr 2003 21:32:03 -0700


William Lee Irwin III <wli@holomorphy.com> wrote:
>> With that in addition to the OOM killer locking patch I posted and
>> another to completely eliminate mm-less processes from consideration
>> 64GB ia32 (with, of course, my oversized out-of-tree patch) recovers
>> from OOM instead of deadlocking after a mass-killing with swap online.

On Tue, Apr 29, 2003 at 09:45:37PM -0700, Andrew Morton wrote:
> Wanna send patch?

out_of_memory() needs to check to be sure ZONE_NORMAL isn't exhausted.
In order to avoid potential regressions on non-highmem systems, make
the check (#ifdef-lessly) conditional on highmem support.

vs. current bk (which has the locking for oom's operational variables)

diff -prauN linux-2.5.68-9/mm/oom_kill.c oom-2.5.68-2/mm/oom_kill.c
--- linux-2.5.68-9/mm/oom_kill.c Wed Apr 23 03:15:53 2003
+++ oom-2.5.68-2/mm/oom_kill.c Wed Apr 30 21:06:48 2003
@@ -16,6 +16,7 @@
*/

#include <linux/mm.h>
+#include <linux/bootmem.h> /* for max_pfn and max_low_pfn */
#include <linux/sched.h>
#include <linux/swap.h>
#include <linux/timex.h>
@@ -217,9 +218,10 @@
unsigned long now, since;

/*
- * Enough swap space left? Not OOM.
+ * Enough swap space and ZONE_NORMAL left? Not OOM.
*/
- if (nr_swap_pages > 0)
+ if (nr_swap_pages > 0 &&
+ (max_pfn == max_low_pfn || nr_free_buffer_pages() > 0))
return;

spin_lock(&oom_lock);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/