- add option to panic when OOM instead of killing processes
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 1 Oct 2004 17:53:49 +0000 (17:53 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 1 Oct 2004 17:53:49 +0000 (17:53 +0000)
init/Kconfig
mm/Makefile

index e63697a..64ca2fc 100644 (file)
@@ -353,6 +353,22 @@ config IKCONFIG_PROC
          This option enables access to the kernel configuration file
          through /proc/config.gz.
 
+config OOM_PANIC
+       bool "OOM Panic"
+       default y
+       ---help---
+         This option enables panic() to be called when a system is out of
+         memory. This feature along with /proc/sys/kernel/panic allows a
+         different behavior on out-of-memory conditions when the standard
+         behavior (killing processes in an attempt to recover) does not
+         make sense.
+
+         If unsure, say N.
+
+config OOM_KILL
+       bool
+       depends on !OOM_PANIC
+       default y
 
 menuconfig EMBEDDED
        bool "Configure standard kernel features (for small systems)"
index b7866b1..60fbbce 100644 (file)
@@ -7,11 +7,13 @@ mmu-$(CONFIG_MMU)     := fremap.o highmem.o madvise.o memory.o mincore.o \
                           mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
                           shmem.o vmalloc.o
 
-obj-y                  := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
+obj-y                  := bootmem.o filemap.o mempool.o fadvise.o \
                           page_alloc.o page-writeback.o pdflush.o prio_tree.o \
                           readahead.o slab.o swap.o truncate.o vmscan.o \
                           $(mmu-y)
 
+obj-$(CONFIG_OOM_KILL) += oom_kill.o
+obj-$(CONFIG_OOM_PANIC)        += oom_panic.o
 obj-$(CONFIG_SWAP)     += page_io.o swap_state.o swapfile.o thrash.o
 obj-$(CONFIG_X86_4G)   += usercopy.o
 obj-$(CONFIG_HUGETLBFS)        += hugetlb.o