diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
commit | 78a45c6f067824cf5d0a9fedea7339ac2e28603c (patch) | |
tree | b4f78c8b6b9059ddace0a18c11629b8d2045f793 /mm/oom_kill.c | |
parent | f96fe225677b3efb74346ebd56fafe3997b02afa (diff) | |
parent | 29d293b6007b91a4463f05bc8d0b26e0e65c5816 (diff) |
Merge branch 'akpm' (second patch-bomb from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- misc fs fixes
- add execveat() syscall
- new ratelimit feature for fault-injection
- decompressor updates
- ipc/ updates
- fallocate feature creep
- fsnotify cleanups
- a few other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits)
cgroups: Documentation: fix trivial typos and wrong paragraph numberings
parisc: percpu: update comments referring to __get_cpu_var
percpu: update local_ops.txt to reflect this_cpu operations
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
fsnotify: remove destroy_list from fsnotify_mark
fsnotify: unify inode and mount marks handling
fallocate: create FAN_MODIFY and IN_MODIFY events
mm/cma: make kmemleak ignore CMA regions
slub: fix cpuset check in get_any_partial
slab: fix cpuset check in fallback_alloc
shmdt: use i_size_read() instead of ->i_size
ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
ipc/msg: increase MSGMNI, remove scaling
ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
lib/decompress.c: consistency of compress formats for kernel image
decompress_bunzip2: off by one in get_next_block()
usr/Kconfig: make initrd compression algorithm selection not expert
fault-inject: add ratelimit option
ratelimit: add initialization macro
...
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 864bba992735..d503e9ce1c7b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -281,14 +281,9 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task, | |||
281 | if (oom_task_origin(task)) | 281 | if (oom_task_origin(task)) |
282 | return OOM_SCAN_SELECT; | 282 | return OOM_SCAN_SELECT; |
283 | 283 | ||
284 | if (task->flags & PF_EXITING && !force_kill) { | 284 | if (task_will_free_mem(task) && !force_kill) |
285 | /* | 285 | return OOM_SCAN_ABORT; |
286 | * If this task is not being ptraced on exit, then wait for it | 286 | |
287 | * to finish before killing some other task unnecessarily. | ||
288 | */ | ||
289 | if (!(task->group_leader->ptrace & PT_TRACE_EXIT)) | ||
290 | return OOM_SCAN_ABORT; | ||
291 | } | ||
292 | return OOM_SCAN_OK; | 287 | return OOM_SCAN_OK; |
293 | } | 288 | } |
294 | 289 | ||
@@ -443,7 +438,7 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, | |||
443 | * If the task is already exiting, don't alarm the sysadmin or kill | 438 | * If the task is already exiting, don't alarm the sysadmin or kill |
444 | * its children or threads, just set TIF_MEMDIE so it can die quickly | 439 | * its children or threads, just set TIF_MEMDIE so it can die quickly |
445 | */ | 440 | */ |
446 | if (p->flags & PF_EXITING) { | 441 | if (task_will_free_mem(p)) { |
447 | set_tsk_thread_flag(p, TIF_MEMDIE); | 442 | set_tsk_thread_flag(p, TIF_MEMDIE); |
448 | put_task_struct(p); | 443 | put_task_struct(p); |
449 | return; | 444 | return; |
@@ -649,7 +644,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, | |||
649 | * select it. The goal is to allow it to allocate so that it may | 644 | * select it. The goal is to allow it to allocate so that it may |
650 | * quickly exit and free its memory. | 645 | * quickly exit and free its memory. |
651 | */ | 646 | */ |
652 | if (fatal_signal_pending(current) || current->flags & PF_EXITING) { | 647 | if (fatal_signal_pending(current) || task_will_free_mem(current)) { |
653 | set_thread_flag(TIF_MEMDIE); | 648 | set_thread_flag(TIF_MEMDIE); |
654 | return; | 649 | return; |
655 | } | 650 | } |