From: Mark Huang Date: Fri, 1 Oct 2004 17:53:49 +0000 (+0000) Subject: - add option to panic when OOM instead of killing processes X-Git-Tag: before-enable-kexec-patch~51 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=531b9c4b9a91e616d07a58d91218ae48a15e468b;p=linux-2.6.git - add option to panic when OOM instead of killing processes --- diff --git a/init/Kconfig b/init/Kconfig index e63697a39..64ca2fcb7 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -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)" diff --git a/mm/Makefile b/mm/Makefile index b7866b1a5..60fbbce51 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -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