linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: mhocko@kernel.org
Cc: linux-mm@kvack.org, rientjes@google.com, akpm@linux-foundation.org
Subject: Re: [PATCH v2] mm,oom: Re-enable OOM killer using timeout.
Date: Wed, 27 Apr 2016 19:43:30 +0900	[thread overview]
Message-ID: <201604271943.IHC87554.MQJtOOFFLSFOVH@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20160426143129.GD20813@dhcp22.suse.cz>

Michal Hocko wrote:
> On Tue 26-04-16 23:00:15, Tetsuo Handa wrote:
> > Michal Hocko wrote:
> > > Hmm, I guess we have already discussed that in the past but I might
> > > misremember. The above relies on oom killer to be triggered after the
> > > previous victim was selected. There is no guarantee this will happen.
> > 
> > Why there is no guarantee this will happen?
> 
> What happens if you even do not hit the out_of_memory path? E.g
> GFP_FS allocation being stuck somewhere in shrinkers waiting for
> somebody to make a forward progress which never happens. Because this is
> essentially what would block the mmap_sem write holder as well and what
> you are trying to workaround by the timeout based approach.
> 

Are you talking about situations where the system hangs up before
mark_oom_victim() is called? If yes, starting a timer from mark_oom_victim()
is too late. We will need to start that timer from __alloc_pages_slowpath()
because __alloc_pages_slowpath() can sleep. Then, we don't need to consider
"OOM livelock before mark_oom_victim() is called" and "OOM livelock after
mark_oom_victim() is called" separately.

> > These OOM livelocks are caused by lack of mechanism for hearing administrator's
> > policy. We are missing rescue mechanisms which are needed for recovering from
> > situations your model did not expect.
> 
> I am not opposed against a rescue policy defined by the admin. All I
> am saying is that the only save and reasonably maintainable one with
> _predictable_ behavior I can see is to reboot/panic/killall-tasks after
> a certain timeout. You consider this to be too harsh but do you at
> least agree that the semantic of this is clear and an admin knows what
> the behavior would be? As we are not able to find a consensus on
> go-to-other-victim approach can we at least agree on the absolute last
> resort first?
> 

Which one ("OOM livelock before mark_oom_victim() is called" or "OOM livelock
after mark_oom_victim() is called") does this "the absolute last resort" apply to?

If this "the absolute last resort" applies to "OOM livelock after mark_oom_victim()
is called", what is your "the absolute last resort" for "OOM livelock before
mark_oom_victim() is called"? My suggestion is to workaround by per task_struct
timeout based approach until such workaround becomes no longer needed.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-04-27 10:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 15:06 [PATCH] " Tetsuo Handa
2016-04-19 20:07 ` Michal Hocko
2016-04-19 21:55   ` Tetsuo Handa
2016-04-20 10:37     ` [PATCH v2] " Tetsuo Handa
2016-04-25 11:47       ` Michal Hocko
2016-04-26 14:00         ` Tetsuo Handa
2016-04-26 14:31           ` Michal Hocko
2016-04-27 10:43             ` Tetsuo Handa [this message]
2016-04-20 14:47     ` [PATCH] " Michal Hocko
2016-04-21 11:49       ` Tetsuo Handa
2016-04-21 13:07         ` Michal Hocko
2016-04-24 14:19           ` Tetsuo Handa
2016-04-25  9:55             ` Michal Hocko
2016-04-26 13:54               ` Michal Hocko
2016-04-27 10:43                 ` Tetsuo Handa
2016-04-27 11:11                   ` Michal Hocko
2016-05-14  0:39                     ` Tetsuo Handa
2016-05-16 14:18                       ` Michal Hocko
2016-05-17 11:08                         ` Tetsuo Handa
2016-05-17 12:51                           ` Michal Hocko
2016-04-26 14:00               ` Tetsuo Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201604271943.IHC87554.MQJtOOFFLSFOVH@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox