Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54226
b: refs/heads/master
c: 2b744c0
h: refs/heads/master
v: v3
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed May 7, 2007
1 parent c279a69 commit 857904b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 824ebef122153a03925ae0ed211b4e8568d1c8db
refs/heads/master: 2b744c01a54fe0c9974ff1b29522f25f07084053
23 changes: 17 additions & 6 deletions trunk/Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,22 @@ and may not be fast.

panic_on_oom

This enables or disables panic on out-of-memory feature. If this is set to 1,
the kernel panics when out-of-memory happens. If this is set to 0, the kernel
will kill some rogue process, called oom_killer. Usually, oom_killer can kill
rogue processes and system will survive. If you want to panic the system
rather than killing rogue processes, set this to 1.
This enables or disables panic on out-of-memory feature.

The default value is 0.
If this is set to 0, the kernel will kill some rogue process,
called oom_killer. Usually, oom_killer can kill rogue processes and
system will survive.

If this is set to 1, the kernel panics when out-of-memory happens.
However, if a process limits using nodes by mempolicy/cpusets,
and those nodes become memory exhaustion status, one process
may be killed by oom-killer. No panic occurs in this case.
Because other nodes' memory may be free. This means system total status
may be not fatal yet.

If this is set to 2, the kernel panics compulsorily even on the
above-mentioned.

The default value is 0.
1 and 2 are for failover of clustering. Please select either
according to your policy of failover.
3 changes: 3 additions & 0 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
show_mem();
}

if (sysctl_panic_on_oom == 2)
panic("out of memory. Compulsory panic_on_oom is selected.\n");

cpuset_lock();
read_lock(&tasklist_lock);

Expand Down

0 comments on commit 857904b

Please sign in to comment.