PATCH: modular out of memory base patch for 2.4.25
Subsystems (14)
Hello!
This patch enables modular oom killer infrastructure. With this base patch, functionality and behavior is unchanged from vanilla 2.4.25.
Comments?
arch/alpha/config.in +1 -0
@@ -317,6 +317,7 @@ tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86 +source mm/Config.in source drivers/parport/Config.in endmenu
arch/alpha/defconfig +2 -0
@@ -74,6 +74,8 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_BINFMT_EM86 is not set +# CONFIG_OOM_KILL is not set + # # Parallel port support
arch/arm/config.in +1 -0
@@ -500,6 +500,7 @@ tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32 string 'Default kernel command string' CONFIG_CMDLINE ""
arch/arm/defconfig +1 -0
@@ -93,6 +93,7 @@ CONFIG_LEDS_TIMER=y CONFIG_LEDS_CPU=y CONFIG_ALIGNMENT_TRAP=y +# CONFIG_OOM_KILL is not set # # Parallel port support
arch/cris/config.in +1 -0
@@ -31,6 +31,7 @@ bool 'Sysctl support' CONFIG_SYSCTL tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +source mm/Config.in string 'Kernel command line' CONFIG_ETRAX_CMDLINE "root=/dev/mtdblock3"
arch/cris/defconfig +1 -0
@@ -20,6 +20,7 @@ CONFIG_BINFMT_ELF=y # CONFIG_ETRAX_KGDB is not set # CONFIG_ETRAX_WATCHDOG is not set +# CONFIG_OOM_KILL is not set # # Hardware setup
arch/i386/config.in +1 -1
@@ -328,7 +328,7 @@ tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in bool 'Power Management support' CONFIG_PM
arch/i386/defconfig +1 -0
@@ -83,6 +83,7 @@ # CONFIG_EISA is not set # CONFIG_MCA is not set CONFIG_HOTPLUG=y +# CONFIG_OOM_KILL is not set # # PCMCIA/CardBus support
arch/ia64/config.in +1 -0
@@ -125,6 +125,7 @@ bool 'Sysctl support' CONFIG_SYSCTL tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then define_bool CONFIG_ACPI y
arch/ia64/defconfig +1 -0
@@ -65,6 +65,7 @@ CONFIG_ACPI_EFI=y CONFIG_ACPI_INTERPRETER=y CONFIG_ACPI_KERNEL_CONFIG=y +# CONFIG_OOM_KILL is not set # # ACPI Support
arch/m68k/config.in +1 -0
@@ -100,6 +100,7 @@ tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in if [ "$CONFIG_AMIGA" = "y" ]; then bool 'Amiga Zorro (AutoConfig) bus support' CONFIG_ZORRO
arch/m68k/defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_PROC_HARDWARE=y # CONFIG_PARPORT is not set # CONFIG_PRINTER is not set +# CONFIG_OOM_KILL is not set # # Loadable module support
arch/mips/config-shared.in +1 -1
@@ -955,7 +955,7 @@ fi tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in if [ "$CONFIG_SOC_AU1X00" = "y" ]; then bool 'Power Management support' CONFIG_PM
arch/mips/defconfig +1 -1
@@ -144,7 +144,7 @@ # CONFIG_MIPS32_N32 is not set # CONFIG_BINFMT_ELF32 is not set # CONFIG_BINFMT_MISC is not set -# CONFIG_OOM_KILLER is not set +# CONFIG_OOM_KILL is not set # # Memory Technology Devices (MTD)
arch/mips64/defconfig +1 -1
@@ -142,7 +142,7 @@ # CONFIG_MIPS32_N32 is not set CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_MISC is not set -# CONFIG_OOM_KILLER is not set +# CONFIG_OOM_KILL is not set # # Memory Technology Devices (MTD)
arch/parisc/config.in +1 -0
@@ -91,6 +91,7 @@ tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in # anyone want to get ACPI working on PA/RISC? define_bool CONFIG_PM n
arch/parisc/defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_IOMMU_SBA=y CONFIG_SUPERIO=y CONFIG_PCI_NAMES=y +# CONFIG_OOM_KILL is not set # # General setup
arch/ppc/config.in +1 -1
@@ -352,7 +352,7 @@ define_bool CONFIG_BINFMT_ELF y define_bool CONFIG_KERNEL_ELF y tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in source drivers/pci/Config.in
arch/ppc/defconfig +1 -1
@@ -60,9 +60,9 @@ CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y CONFIG_BINFMT_MISC=m -# CONFIG_OOM_KILLER is not set CONFIG_PCI_NAMES=y CONFIG_HOTPLUG=y +# CONFIG_OOM_KILL is not set # # PCMCIA/CardBus support
arch/ppc64/config.in +2 -1
@@ -1,4 +1,4 @@ -# +# # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. #
@@ -86,6 +86,7 @@ tristate 'Kernel support for 32 bit ELF binaries' CONFIG_BINFMT_ELF32 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in source drivers/pci/Config.in
arch/ppc64/defconfig +1 -0
@@ -60,6 +60,7 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_NAMES=y # CONFIG_HOTPLUG is not set +# CONFIG_OOM_KILL is not set # # Parallel port support
arch/s390/config.in +1 -0
@@ -59,6 +59,7 @@ define_bool CONFIG_KCORE_ELF y tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT bool 'VM shared kernel support' CONFIG_SHARED_KERNEL
arch/s390/defconfig +1 -0
@@ -50,6 +50,7 @@ # CONFIG_PROCESS_DEBUG is not set CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set +# CONFIG_OOM_KILL is not set # # Block device drivers
arch/s390x/config.in +1 -0
@@ -62,6 +62,7 @@ define_bool CONFIG_KCORE_ELF y tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT bool 'VM shared kernel support' CONFIG_SHARED_KERNEL
arch/s390x/defconfig +1 -0
@@ -51,6 +51,7 @@ # CONFIG_PROCESS_DEBUG is not set CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set +# CONFIG_OOM_KILL is not set # # Block device drivers
arch/sh/config.in +2 -3
@@ -284,8 +284,7 @@ fi tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC - -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in source drivers/parport/Config.in
@@ -492,4 +491,4 @@ endmenu source crypto/Config.in -source lib/Config.in +source lib/Config.in
arch/sh/defconfig +1 -0
@@ -49,6 +49,7 @@ # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set +# CONFIG_OOM_KILL is not set # # Parallel port support
arch/sh64/config.in +1 -2
@@ -154,8 +154,7 @@ fi tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC - -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in # source drivers/parport/Config.in
arch/sh64/defconfig +1 -0
@@ -84,6 +84,7 @@ # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set +# CONFIG_OOM_KILL is not set # # Block devices
arch/sparc/config.in +1 -1
@@ -76,7 +76,7 @@ tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in source drivers/parport/Config.in dep_tristate ' Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT endmenu
arch/sparc/defconfig +1 -1
@@ -53,7 +53,7 @@ CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_SUNOS_EMUL=y -# CONFIG_OOM_KILLER is not set +# CONFIG_OOM_KILL is not set # # Parallel port support
arch/sparc64/config.in +1 -1
@@ -82,7 +82,7 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'Solaris binary emulation (EXPERIMENTAL)' CONFIG_SOLARIS_EMUL fi -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER +source mm/Config.in source drivers/parport/Config.in dep_tristate ' Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT if [ "$CONFIG_PCI" = "y" ]; then
arch/sparc64/defconfig +1 -1
@@ -59,7 +59,7 @@ CONFIG_BINFMT_MISC=m # CONFIG_SUNOS_EMUL is not set CONFIG_SOLARIS_EMUL=m -# CONFIG_OOM_KILLER is not set +# CONFIG_OOM_KILL is not set # # Parallel port support
arch/x86_64/config.in +1 -0
@@ -110,6 +110,7 @@ #tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +source mm/Config.in bool 'Power Management support' CONFIG_PM
arch/x86_64/defconfig +1 -0
@@ -68,6 +68,7 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PM=y CONFIG_IA32_EMULATION=y +# CONFIG_OOM_KILL is not set # # ACPI Support
Documentation/Configure.help +15 -14
@@ -412,20 +412,6 @@ Otherwise low memory pages are used as bounce buffers causing a degrade in performance. -OOM killer support -CONFIG_OOM_KILLER - This option selects the kernel behaviour during total out of memory - condition. - - The default behaviour is to, as soon as no freeable memory and no swap - space are available, kill the task which tries to allocate memory. - The default behaviour is very reliable. - - If you select this option, as soon as no freeable memory is available, - the kernel will try to select the "best" task to be killed. - - If unsure, say N. - Normal floppy disk support CONFIG_BLK_DEV_FD If you want to use the floppy disk drive(s) of your PC under Linux,
@@ -440,6 +426,21 @@ The module will be called floppy.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. +Classic out of memory killer +CONFIG_OOM_KILL + This option enables the traditional oom_kill.c mechanism for + killing processes in an attempt to recover from an out-of-memory + condition. + + The default behaviour is to, as soon as no freeable memory and no swap + space are available, kill the task which tries to allocate memory. + The default behaviour is very reliable. + + If you select this option, as soon as no freeable memory is available, + the kernel will try to select the "best" task to be killed. + + If unsure, say N. + iSeries Virtual I/O Disk Support CONFIG_VIODASD If you are running on an iSeries system and you want to use
include/linux/mm.h +2 -0
@@ -338,6 +338,8 @@struct zone_struct ;extern struct zone_struct *zone_table[]; +extern int get_nr_swap_pages (void ); +static inline zone_t *page_zone (struct page *page) {return zone_table[page->flags >>ZONE_SHIFT ];
include/linux/notifier.h +3 -0
@@ -60,5 +60,8 @@#define NETLINK_URELEASE 0x0001/* Unicast netlink socket released */ +#define OUT_OF_MEMORY 0x00001/* Notify of critical memory shortage */ + +#endif /* __KERNEL__ */ #endif /* _LINUX_NOTIFIER_H */
include/linux/oom_notifier.h +40 -0
@@ -0,0 +1,40 @@ +#ifndef _LINUX_OOM_NOTIFIER_H +#define _LINUX_OOM_NOTIFIER_H + + +#ifdef debug +#undef dbg +#endif +#define dbg(format, arg...) \ +do { \ + printk (KERN_DEBUG "Out of memory: " format "\n", ## arg); \ +} while(0) + +#ifdef warn +#undef warn +#endif +#define warn(format, arg...) \ +do { \ + printk (KERN_WARNING "Out of memory: " format "\n", ## arg); \ +} while(0) + +#ifdef info +#undef info +#endif +#define info(format, arg...) \ +do { \ + printk (KERN_INFO "Out of Memory: " format "\n", ## arg); \ +} while(0) + +#ifdef error +#undef error +#endif +#define error(format, arg...) \ +do { \ + printk (KERN_ERR "Out of Memory: " format "\n", ## arg); \ +} while(0) + +int register_oom_notifier (struct notifier_block * nb); +int unregister_oom_notifier (struct notifier_block * nb); + +#endif /* _LINUX_OOM_NOTIFIER_H */
include/linux/sysctl.h +2 -1
@@ -156,6 +156,7 @@VM_MAPPED_RATIO =20 ,/* amount of unfreeable pages that triggers swapout */ VM_LAPTOP_MODE =21 ,/* kernel in laptop flush mode */ VM_BLOCK_DUMP =22 ,/* dump fs activity to log */ + VM_OOM=23, /* Out of memory */ };
@@ -810,7 +811,7 @@struct list_head ctl_entry; }; -struct ctl_table_header *register_sysctl_table (ctl_table * table, +struct ctl_table_header *register_sysctl_table (ctl_table * table,int insert_at_head);void unregister_sysctl_table (struct ctl_table_header * table);
mm/Config.in +6 -0
@@ -0,0 +1,6 @@ +mainmenu_option next_comment +comment 'Out of memory killer' + +tristate 'Classic' CONFIG_OOM_KILL + +endmenu
mm/Makefile +5 -3
@@ -9,13 +9,15 @@ O_TARGET := mm.o -export-objs := shmem.o filemap.o memory.o page_alloc.o +export-objs := shmem.o filemap.o memory.o page_alloc.o oom_notifier.o obj-y := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \ vmalloc.o slab.o bootmem.o swap.o vmscan.o page_io.o \ - page_alloc.o swap_state.o swapfile.o numa.o oom_kill.o \ - shmem.o + page_alloc.o swap_state.o swapfile.o numa.o \ + shmem.o oom_notifier.o obj-$(CONFIG_HIGHMEM) += highmem.o +obj-$(CONFIG_OOM_KILL) += oom_kill.o + include $(TOPDIR)/Rules.make
mm/oom_kill.c +49 -7
99 lines not on this page · raw message
mm/oom_notifier.c +44 -0
44 lines not on this page · raw message
mm/page_alloc.c +9 -0
@@ -495,6 +495,15 @@ }/* +* Total amount of swap pages +*/ +int get_nr_swap_pages (void ) +{ +return nr_swap_pages; +} +EXPORT_SYMBOL (get_nr_swap_pages); + +/* * Amount of free RAM allocatable as buffer memory: */ unsigned int nr_free_buffer_pages (void )
Re: PATCH: modular out of memory additional modules patch for 2.4.25
These are two additional modules for OOM, oom-panic and oom-parent-kill. Details can be found in Configure.help.
arch/alpha/defconfig +2 -0
@@ -75,6 +75,8 @@ # CONFIG_BINFMT_MISC is not set # CONFIG_BINFMT_EM86 is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set #
arch/arm/defconfig +2 -0
@@ -94,6 +94,8 @@ CONFIG_LEDS_CPU=y CONFIG_ALIGNMENT_TRAP=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Parallel port support
arch/cris/defconfig +2 -0
@@ -21,6 +21,8 @@ # CONFIG_ETRAX_KGDB is not set # CONFIG_ETRAX_WATCHDOG is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Hardware setup
arch/i386/defconfig +2 -0
@@ -84,6 +84,8 @@ # CONFIG_MCA is not set CONFIG_HOTPLUG=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # PCMCIA/CardBus support
arch/ia64/defconfig +2 -0
@@ -66,6 +66,8 @@ CONFIG_ACPI_INTERPRETER=y CONFIG_ACPI_KERNEL_CONFIG=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # ACPI Support
arch/m68k/defconfig +2 -0
@@ -54,6 +54,8 @@ # CONFIG_PARPORT is not set # CONFIG_PRINTER is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Loadable module support
arch/mips/defconfig +2 -0
@@ -145,6 +145,8 @@ # CONFIG_BINFMT_ELF32 is not set # CONFIG_BINFMT_MISC is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Memory Technology Devices (MTD)
arch/mips64/defconfig +2 -0
@@ -143,6 +143,8 @@ CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_MISC is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Memory Technology Devices (MTD)
arch/parisc/defconfig +2 -0
@@ -46,6 +46,8 @@ CONFIG_SUPERIO=y CONFIG_PCI_NAMES=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # General setup
arch/ppc/defconfig +2 -0
@@ -63,6 +63,8 @@ CONFIG_PCI_NAMES=y CONFIG_HOTPLUG=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # PCMCIA/CardBus support
arch/ppc64/defconfig +2 -0
@@ -61,6 +61,8 @@ CONFIG_PCI_NAMES=y # CONFIG_HOTPLUG is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Parallel port support
arch/s390/defconfig +2 -0
@@ -51,6 +51,8 @@ CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Block device drivers
arch/s390x/defconfig +2 -0
@@ -52,6 +52,8 @@ CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Block device drivers
arch/sh/defconfig +2 -0
@@ -50,6 +50,8 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Parallel port support
arch/sh64/defconfig +2 -0
@@ -85,6 +85,8 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Block devices
arch/sparc/defconfig +2 -0
@@ -54,6 +54,8 @@ CONFIG_BINFMT_MISC=m CONFIG_SUNOS_EMUL=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Parallel port support
arch/sparc64/defconfig +2 -0
@@ -60,6 +60,8 @@ # CONFIG_SUNOS_EMUL is not set CONFIG_SOLARIS_EMUL=m # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # Parallel port support
arch/x86_64/defconfig +2 -0
@@ -69,6 +69,8 @@ CONFIG_PM=y CONFIG_IA32_EMULATION=y # CONFIG_OOM_KILL is not set +# CONFIG_OOM_KPPID is not set +# CONFIG_OOM_PANIC is not set # # ACPI Support
Documentation/Configure.help +23 -0
@@ -441,6 +441,29 @@ If unsure, say N. +Panic on out of memory conditions +CONFIG_OOM_PANIC + 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. + +Kill parents that keep producing bad children +CONFIG_OOM_KPPID + This option enables an out-of-memory handler that not only attempts + to kill bad processes to free up memory, but also kills parents + that repeatedly produce bad children. + + Two tunables, oom_parent_max and oom_parent_expire, will be added + and to /proc/sys/vm/ to control how many children a parent is + allowed to have terminated, and how long between terminated children + before a parent is forgiven. + + If unsure, say N. + iSeries Virtual I/O Disk Support CONFIG_VIODASD If you are running on an iSeries system and you want to use
mm/Config.in +28 -0
@@ -2,5 +2,33 @@ comment 'Out of memory killer' tristate 'Classic' CONFIG_OOM_KILL +if [ "$CONFIG_OOM_KILL" = "y" ]; then + if [ "$CONFIG_OOM_PANIC" = "y" ]; then + define_tristate CONFIG_OOM_PANIC m + fi + if [ "$CONFIG_OOM_KPPID" = "y" ]; then + define_tristate CONFIG_OOM_KPPID m + fi +fi + +tristate 'Kill parents' CONFIG_OOM_KPPID +if [ "$CONFIG_OOM_KPPID" = "y" ]; then + if [ "$CONFIG_OOM_PANIC" = "y" ]; then + define_tristate CONFIG_OOM_PANIC m + fi + if [ "$CONFIG_OOM_KILL" = "y" ]; then + define_tristate CONFIG_OOM_KILL m + fi +fi + +tristate 'Panic' CONFIG_OOM_PANIC +if [ "$CONFIG_OOM_PANIC" = "y" ]; then + if [ "$CONFIG_OOM_KILL" = "y" ]; then + define_tristate CONFIG_OOM_KILL m + fi + if [ "$CONFIG_OOM_KPPID" = "y" ]; then + define_tristate CONFIG_OOM_KPPID m + fi +fi endmenu
mm/Makefile +2 -0
@@ -19,5 +19,7 @@ obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_OOM_KILL) += oom_kill.o +obj-$(CONFIG_OOM_KPPID) += oom_kill_parent.o +obj-$(CONFIG_OOM_PANIC) += oom_panic.o include $(TOPDIR)/Rules.make
mm/oom_kill.c +1 -1
@@ -15,7 +15,7 @@* kernel subsystems and hints as to where to find out what things do. * * Modularized by using notifies by --rustyl <[email protected]> -* Final modularization (C) 2003,2004 Tvrtko A. Ursulin ([email protected]) +* Final modularization (C) 2003 Tvrtko A. Ursulin ([email protected]) */ #include <linux/kernel.h>
mm/oom_kill_parent.c +458 -0
458 lines not on this page · raw message
mm/oom_panic.c +50 -0
50 lines not on this page · raw message