diff options
| author | Johannes Weiner <hannes@cmpxchg.org> | 2016-03-17 14:17:26 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-12-01 22:01:17 +0100 |
| commit | c23fd9a96897dfd09ca27e0eb80a0eb74b4bef1c (patch) | |
| tree | 4bd7cf09e9678f32dd4cb92686e2d0bf94861dee | |
| parent | f3af5b659f23e49677ce68b5b0753a45cbe24137 (diff) | |
BACKPORT: mm: oom_kill: don't ignore oom score on exiting tasks
When the OOM killer scans tasks and encounters a PF_EXITING one, it
force-selects that task regardless of the score. The problem is that if
that task got stuck waiting for some state the allocation site is
holding, the OOM reaper can not move on to the next best victim.
Frankly, I don't even know why we check for exiting tasks in the OOM
killer. We've tried direct reclaim at least 15 times by the time we
decide the system is OOM, there was plenty of time to exit and free
memory; and a task might exit voluntarily right after we issue a kill.
This is testing pure noise. Remove it.
BUG=chromium:706048, chromium:702707
TEST=With whole series, eating memory doesn't hang system
Conflicts:
mm/oom_kill.c
There were extra checked in 3.14, but the concept is still the same.
Change-Id: Ied8391fd2d8cda4d1728a28dbe6cfea31883b24e
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Argangeli <andrea@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from commit 6a618957ad17d8f4f4c7eeede752685374b1b176)
Reviewed-on: https://chromium-review.googlesource.com/465411
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Joe Maples <joe@frap129.org>
| -rw-r--r-- | mm/oom_kill.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 219cc120f..1e38baec3 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -283,14 +283,6 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task, if (oom_task_origin(task)) return OOM_SCAN_SELECT; - if (task->flags & PF_EXITING && !force_kill) { - /* - * If this task is not being ptraced on exit, then wait for it - * to finish before killing some other task unnecessarily. - */ - if (!(task->group_leader->ptrace & PT_TRACE_EXIT)) - return OOM_SCAN_ABORT; - } return OOM_SCAN_OK; } |
