diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-03-19 03:05:10 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-03-19 03:05:10 -0400 |
commit | b4b7a4ef097f288f724420b473dbf92a89c0ab7e (patch) | |
tree | 23ad8101e3e77c32a8d1e1b95a9c1cd7f7a475b7 /mm/oom_kill.c | |
parent | e9ce335df51ff782035a15c261a3c0c9892a1767 (diff) | |
parent | a3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff) |
Merge branch 'master' into for-linus
Conflicts:
block/Kconfig
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 35755a4156d6..9b223af6a147 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -473,6 +473,8 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask) | |||
473 | unsigned long points = 0; | 473 | unsigned long points = 0; |
474 | struct task_struct *p; | 474 | struct task_struct *p; |
475 | 475 | ||
476 | if (sysctl_panic_on_oom == 2) | ||
477 | panic("out of memory(memcg). panic_on_oom is selected.\n"); | ||
476 | read_lock(&tasklist_lock); | 478 | read_lock(&tasklist_lock); |
477 | retry: | 479 | retry: |
478 | p = select_bad_process(&points, mem); | 480 | p = select_bad_process(&points, mem); |
@@ -601,13 +603,6 @@ void pagefault_out_of_memory(void) | |||
601 | /* Got some memory back in the last second. */ | 603 | /* Got some memory back in the last second. */ |
602 | return; | 604 | return; |
603 | 605 | ||
604 | /* | ||
605 | * If this is from memcg, oom-killer is already invoked. | ||
606 | * and not worth to go system-wide-oom. | ||
607 | */ | ||
608 | if (mem_cgroup_oom_called(current)) | ||
609 | goto rest_and_return; | ||
610 | |||
611 | if (sysctl_panic_on_oom) | 606 | if (sysctl_panic_on_oom) |
612 | panic("out of memory from page fault. panic_on_oom is selected.\n"); | 607 | panic("out of memory from page fault. panic_on_oom is selected.\n"); |
613 | 608 | ||
@@ -619,7 +614,6 @@ void pagefault_out_of_memory(void) | |||
619 | * Give "p" a good chance of killing itself before we | 614 | * Give "p" a good chance of killing itself before we |
620 | * retry to allocate memory. | 615 | * retry to allocate memory. |
621 | */ | 616 | */ |
622 | rest_and_return: | ||
623 | if (!test_thread_flag(TIF_MEMDIE)) | 617 | if (!test_thread_flag(TIF_MEMDIE)) |
624 | schedule_timeout_uninterruptible(1); | 618 | schedule_timeout_uninterruptible(1); |
625 | } | 619 | } |