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


Groups > linux.kernel > #1428465

Re: mm, oom_reaper: How to handle race with oom_killer_disable() ?

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: mm, oom_reaper: How to handle race with oom_killer_disable() ?
Date 2016-06-22 08:50 +0200
Message-ID <rMK93-8lW-7@gated-at.bofh.it> (permalink)
References (1 earlier) <rMslR-5hj-53@gated-at.bofh.it> <rMtUC-6nL-7@gated-at.bofh.it> <rMvWq-7DO-23@gated-at.bofh.it> <rMy7T-xD-3@gated-at.bofh.it> <rMBIu-2Rm-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 22-06-16 06:47:48, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > On Wed 22-06-16 00:32:29, Tetsuo Handa wrote:
> > > Michal Hocko wrote:
> > [...]
> > > > Hmm, what about the following instead. It is rather a workaround than a
> > > > full flaged fix but it seems much more easier and shouldn't introduce
> > > > new issues.
> > > 
> > > Yes, I think that will work. But I think below patch (marking signal_struct
> > > to ignore TIF_MEMDIE instead of clearing TIF_MEMDIE from task_struct) on top of
> > > current linux.git will implement no-lockup requirement. No race is possible unlike
> > > "[PATCH 10/10] mm, oom: hide mm which is shared with kthread or global init".
> > 
> > Not really. Because without the exit_oom_victim from oom_reaper you have
> > no guarantee that the oom_killer_disable will ever return. I have
> > mentioned that in the changelog. There is simply no guarantee the oom
> > victim will ever reach exit_mm->exit_oom_victim.
> 
> Why? Since any allocation after setting oom_killer_disabled = true will be
> forced to fail, nobody will be blocked on waiting for memory allocation. Thus,
> the TIF_MEMDIE tasks will eventually reach exit_mm->exit_oom_victim, won't it?

What if it gets blocked waiting for an operation which cannot make any
forward progress because it cannot proceed with an allocation (e.g.
an open coded allocation retry loop - not that uncommon when sending
a bio)? I mean if we want to guarantee a forward progress then there has
to be something to clear the flag no matter in what state the oom victim
is or give up on oom_killer_disable.

-- 
Michal Hocko
SUSE Labs

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


Thread

Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-13 13:20 +0200
  Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-21 10:40 +0200
    Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-21 13:50 +0200
      Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-21 15:30 +0200
        Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-06-21 17:40 +0200
          Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-21 20:00 +0200
            Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-06-21 23:50 +0200
              Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-22 08:50 +0200
                Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-22 09:00 +0200
                Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-06-22 13:00 +0200
                Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-22 14:10 +0200
                Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Michal Hocko <mhocko@kernel.org> - 2016-06-22 14:20 +0200
    Re: mm, oom_reaper: How to handle race with oom_killer_disable() ? Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-06-21 14:00 +0200

csiph-web