diff options
author | Michal Hocko <mhocko@suse.com> | 2016-07-29 01:44:46 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-29 02:07:41 +0300 |
commit | b18dc5f291c07ddaf31562b9f27b3a122f1f9b7e (patch) | |
tree | 662d9000ce928c625fafa33c71f33c30db2b95bd /include/linux/dirent.h | |
parent | 44a70adec910d6929689e42b6e5cee5b7d202d20 (diff) | |
download | linux-b18dc5f291c07ddaf31562b9f27b3a122f1f9b7e.tar.xz |
mm, oom: skip vforked tasks from being selected
vforked tasks are not really sitting on any memory. They are sharing the
mm with parent until they exec into a new code. Until then it is just
pinning the address space. OOM killer will kill the vforked task along
with its parent but we still can end up selecting vforked task when the
parent wouldn't be selected. E.g. init doing vfork to launch a task or
vforked being a child of oom unkillable task with an updated oom_score_adj
to be killable.
Add a new helper to check whether a task is in the vfork sharing memory
with its parent and use it in oom_badness to skip over these tasks.
Link: http://lkml.kernel.org/r/1466426628-15074-6-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dirent.h')
0 files changed, 0 insertions, 0 deletions