diff options
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6e999c88c503..00d0bd7d6a2b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/notifier.h> | 27 | #include <linux/notifier.h> |
28 | 28 | ||
29 | int sysctl_panic_on_oom; | 29 | int sysctl_panic_on_oom; |
30 | int sysctl_oom_kill_allocating_task; | ||
30 | static DEFINE_MUTEX(zone_scan_mutex); | 31 | static DEFINE_MUTEX(zone_scan_mutex); |
31 | /* #define DEBUG */ | 32 | /* #define DEBUG */ |
32 | 33 | ||
@@ -471,14 +472,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) | |||
471 | "No available memory (MPOL_BIND)"); | 472 | "No available memory (MPOL_BIND)"); |
472 | break; | 473 | break; |
473 | 474 | ||
474 | case CONSTRAINT_CPUSET: | ||
475 | oom_kill_process(current, points, | ||
476 | "No available memory in cpuset"); | ||
477 | break; | ||
478 | |||
479 | case CONSTRAINT_NONE: | 475 | case CONSTRAINT_NONE: |
480 | if (sysctl_panic_on_oom) | 476 | if (sysctl_panic_on_oom) |
481 | panic("out of memory. panic_on_oom is selected\n"); | 477 | panic("out of memory. panic_on_oom is selected\n"); |
478 | /* Fall-through */ | ||
479 | case CONSTRAINT_CPUSET: | ||
480 | if (sysctl_oom_kill_allocating_task) { | ||
481 | oom_kill_process(current, points, | ||
482 | "Out of memory (oom_kill_allocating_task)"); | ||
483 | break; | ||
484 | } | ||
482 | retry: | 485 | retry: |
483 | /* | 486 | /* |
484 | * Rambo mode: Shoot down a process and hope it solves whatever | 487 | * Rambo mode: Shoot down a process and hope it solves whatever |