Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187227
b: refs/heads/master
c: daaf1e6
h: refs/heads/master
i:
  187225: 5e95698
  187223: 61ec4b7
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Mar 12, 2010
1 parent 3e1ab1a commit 4af0acb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: 1080d7a30304d03b1d9fd530aacd8aece2d702a2
refs/heads/master: daaf1e68874c078a15ae6ae827751839c4d81739
5 changes: 4 additions & 1 deletion trunk/Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ list.
NOTE: Reclaim does not work for the root cgroup, since we cannot set any
limits on the root cgroup.

Note2: When panic_on_oom is set to "2", the whole system will panic.

2. Locking

The memory controller uses the following hierarchy
Expand Down Expand Up @@ -379,7 +381,8 @@ The feature can be disabled by
NOTE1: Enabling/disabling will fail if the cgroup already has other
cgroups created below it.

NOTE2: This feature can be enabled/disabled per subtree.
NOTE2: When panic_on_oom is set to "2", the whole system will panic in
case of an oom event in any cgroup.

7. Soft limits

Expand Down
5 changes: 4 additions & 1 deletion trunk/Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,14 @@ 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.
above-mentioned. Even oom happens under memory cgroup, the whole
system panics.

The default value is 0.
1 and 2 are for failover of clustering. Please select either
according to your policy of failover.
panic_on_oom=2+kdump gives you very strong tool to investigate
why oom happens. You can get snapshot.

=============================================================

Expand Down
2 changes: 2 additions & 0 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask)
unsigned long points = 0;
struct task_struct *p;

if (sysctl_panic_on_oom == 2)
panic("out of memory(memcg). panic_on_oom is selected.\n");
read_lock(&tasklist_lock);
retry:
p = select_bad_process(&points, mem);
Expand Down

0 comments on commit 4af0acb

Please sign in to comment.