From: David Rientjes <rientjes@google.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: hannes@cmpxchg.org, mhocko@kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
mgorman@suse.de, torvalds@linux-foundation.org, oleg@redhat.com,
hughd@google.com, andrea@kernel.org, riel@redhat.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm,oom: Re-enable OOM killer using timers.
Date: Tue, 19 Jan 2016 15:13:46 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.10.1601191502230.7346@chino.kir.corp.google.com> (raw)
In-Reply-To: <201601151936.IJJ09362.OOFLtVFJHSFQMO@I-love.SAKURA.ne.jp>
On Fri, 15 Jan 2016, Tetsuo Handa wrote:
> Leaving a system OOM-livelocked forever is very very annoying thing.
Agreed.
> My goal is to ask the OOM killer not to toss the OOM killer's duty away.
> What is important for me is that the OOM killer takes next action when
> current action did not solve the OOM situation.
>
What is the "next action" when there are no more processes on your system,
or attached to your memcg hierarchy, that are killable?
Of course your proposal offers no solution for that. Extend it further:
what is the "next action" when the process holding the mutex needed by the
victim is oom disabled?
I don't think it's in the best interest of the user to randomly kill
processes until one exits and implicitly hoping that one of your
selections will be able to do so (your notion of "pick and pray").
> > These additional kills can result
> > in the same livelock that is already problematic, and killing additional
> > processes has made the situation worse since memory reserves are more
> > depleted.
>
> Why are you still assuming that memory reserves are more depleted if we kill
> additional processes? We are introducing the OOM reaper which can compensate
> memory reserves if we kill additional processes. We can make the OOM reaper
> update oom priority of all processes that use a mm the OOM killer chose
> ( http://lkml.kernel.org/r/201601131915.BCI35488.FHSFQtVMJOOOLF@I-love.SAKURA.ne.jp )
> so that we can help the OOM reaper compensate memory reserves by helping
> the OOM killer to select a different mm.
>
We are not adjusting the selection heuristic, which is already
determinisitic and people use to fine tune through procfs, for what the
oom reaper can free.
Even if you can free memory immediately, there is no guarantee that a
process holding a mutex needed for the victim to exit will be able to
allocate from that memory. Continuing to kill more and more processes may
eventually solve the situation which simply granting access to memory
reserves temporarily would have also solved, but at the cost of, well,
many processes.
The final solution may combine both approaches, which are the only real
approaches on how to make forward progress. We could first try allowing
temporary access to memory reserves when a livelock has been detected,
similar to my patch, and then fallback to killing additional processes
since the oom reaper should be able to at least free some of that memory
immediately, if it fails.
However, I think the best course of action at the moment is to review and
get the oom reaper merged, if applicable, since it should greatly aid this
issue and then look at livelock issues as they arise once it is deployed.
I'm not enthusiastic about adding additional heuristics and tunables for
theoretical issues that may arise, especially considering the oom reaper
is not even upstream.
--
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>
next prev parent reply other threads:[~2016-01-19 23:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 11:26 Tetsuo Handa
2016-01-13 1:36 ` David Rientjes
2016-01-13 12:11 ` Tetsuo Handa
2016-01-13 16:26 ` Michal Hocko
2016-01-13 16:56 ` Johannes Weiner
2016-01-13 18:01 ` Michal Hocko
2016-01-14 11:26 ` Tetsuo Handa
2016-01-14 22:01 ` David Rientjes
2016-01-14 22:58 ` Johannes Weiner
2016-01-14 23:09 ` David Rientjes
2016-01-15 10:36 ` Tetsuo Handa
2016-01-19 23:13 ` David Rientjes [this message]
2016-01-20 14:36 ` Tetsuo Handa
2016-01-20 23:49 ` David Rientjes
2016-01-21 11:44 ` Tetsuo Handa
2016-01-21 23:15 ` David Rientjes
2016-01-22 13:59 ` Tetsuo Handa
2016-01-22 14:57 ` Johannes Weiner
2016-01-26 23:44 ` David Rientjes
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=alpine.DEB.2.10.1601191502230.7346@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@kernel.org \
--cc=oleg@redhat.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
/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