Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1336490

Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim.

From Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Newsgroups linux.kernel
Subject Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim.
Date 2016-02-17 15:50 +0100
Message-ID <r3bAt-7Ju-13@gated-at.bofh.it> (permalink)
References <r37wS-51u-25@gated-at.bofh.it> <r37Gz-55s-33@gated-at.bofh.it> <r39S1-6yA-1@gated-at.bofh.it> <r3a1H-6Rw-5@gated-at.bofh.it> <r3aXM-7tK-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Michal Hocko wrote:
> On Wed 17-02-16 22:07:31, Tetsuo Handa wrote:
> > Michal Hocko wrote:
> > > On Wed 17-02-16 19:30:41, Tetsuo Handa wrote:
> > > > >From 22bd036766e70f0df38c38f3ecc226e857d20faf Mon Sep 17 00:00:00 2001
> > > > From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> > > > Date: Wed, 17 Feb 2016 16:30:59 +0900
> > > > Subject: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim.
> > > > 
> > > > Currently, oom_scan_process_thread() returns OOM_SCAN_ABORT when there
> > > > is a thread which is exiting. But it is possible that that thread is
> > > > blocked at down_read(&mm->mmap_sem) in exit_mm() called from do_exit()
> > > > whereas one of threads sharing that memory is doing a GFP_KERNEL
> > > > allocation between down_write(&mm->mmap_sem) and up_write(&mm->mmap_sem)
> > > > (e.g. mmap()). Under such situation, the OOM killer does not choose a
> > > > victim, which results in silent OOM livelock problem.
> > > 
> > > Again, such a thread/task will have fatal_signal_pending and so have
> > > access to memory reserves. So the text is slightly misleading imho.
> > > Sure if the memory reserves are depleted then we will not move on but
> > > then it is not clear whether the current patch helps either.
> > 
> > I don't think so.
> > Please see http://lkml.kernel.org/r/201602151958.HCJ48972.FFOFOLMHSQVJtO@I-love.SAKURA.ne.jp .
> 
> I have missed this one. Reading...
> 
> Hmm, so you are not referring to OOM killed task but naturally exiting
> thread which is racing with the OOM killer. I guess you have a point
> there! Could you update the changelog with the above example and repost
> please?
> 
Yes and I resent that patch as v2.

I think that the same problem exists for any task_will_free_mem()-based
optimizations. Can we eliminate them because these optimized paths are not
handled by the OOM reaper which means that we have no means other than
"[PATCH 5/6] mm,oom: Re-enable OOM killer using timers." ?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] preparation for merging the OOM reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:30 +0100
  [PATCH 1/6] mm,oom: exclude TIF_MEMDIE processes from candidates. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:30 +0100
    Re: [PATCH 1/6] mm,oom: exclude TIF_MEMDIE processes from candidates. Michal Hocko <mhocko@kernel.org> - 2016-02-17 13:50 +0100
      Re: [PATCH 1/6] mm,oom: exclude TIF_MEMDIE processes from candidates. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 17:50 +0100
        Re: [PATCH 1/6] mm,oom: exclude TIF_MEMDIE processes from candidates. Michal Hocko <mhocko@kernel.org> - 2016-02-17 18:40 +0100
          Re: [PATCH 1/6] mm,oom: exclude TIF_MEMDIE processes from candidates. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 22:00 +0100
  [PATCH 6/6] mm,oom: wait for OOM victims when using oom_kill_allocating_task == 1 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:40 +0100
    Re: [PATCH 6/6] mm,oom: wait for OOM victims when using  oom_kill_allocating_task == 1 Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:40 +0100
      Re: [PATCH 6/6] mm,oom: wait for OOM victims when using oom_kill_allocating_task == 1 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-18 11:50 +0100
        Re: [PATCH 6/6] mm,oom: wait for OOM victims when using  oom_kill_allocating_task == 1 Michal Hocko <mhocko@kernel.org> - 2016-02-18 13:30 +0100
  [PATCH 4/6] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:40 +0100
    Re: [PATCH 4/6] mm,oom: exclude oom_task_origin processes if they  are OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:20 +0100
      Re: [PATCH 4/6] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 14:40 +0100
        Re: [PATCH 4/6] mm,oom: exclude oom_task_origin processes if they  are OOM-unkillable. Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:50 +0100
  [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:40 +0100
    Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when  selecting a victim. Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:00 +0100
      Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 14:10 +0100
        Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when  selecting a victim. Michal Hocko <mhocko@kernel.org> - 2016-02-17 15:10 +0100
          Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 15:50 +0100
            Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when  selecting a victim. Michal Hocko <mhocko@kernel.org> - 2016-02-17 16:10 +0100
              Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 16:30 +0100
                Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when  selecting a victim. Michal Hocko <mhocko@kernel.org> - 2016-02-17 17:20 +0100
                Re: [PATCH 2/6] mm,oom: don't abort on exiting processes when selecting a victim. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-18 12:30 +0100
  [PATCH 3/6] mm,oom: exclude oom_task_origin processes if they are OOM victims. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:40 +0100
    Re: [PATCH 3/6] mm,oom: exclude oom_task_origin processes if they  are OOM victims. Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:10 +0100
  [PATCH 5/6] mm,oom: Re-enable OOM killer using timers. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-17 11:40 +0100
    Re: [PATCH 5/6] mm,oom: Re-enable OOM killer using timers. Michal Hocko <mhocko@kernel.org> - 2016-02-17 14:30 +0100

csiph-web