From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: why do we do ALLOC_WMARK_HIGH before going out_of_memory
Date: Thu, 28 Jan 2016 16:12:40 -0500 [thread overview]
Message-ID: <20160128211240.GA4163@cmpxchg.org> (raw)
In-Reply-To: <20160128201123.GB621@dhcp22.suse.cz>
On Thu, Jan 28, 2016 at 09:11:23PM +0100, Michal Hocko wrote:
> On Thu 28-01-16 20:02:04, Andrea Arcangeli wrote:
> > It's not immediately apparent if there is a new OOM killer upstream
> > logic that would prevent the risk of a second OOM killer invocation
> > despite another OOM killing already happened while we were stuck in
> > reclaim. In absence of that, the high wmark check would be still
> > needed.
>
> Well, my oom detection rework [1] strives to make the OOM detection more
> robust and the retry logic performs the watermark check. So I think the
> last attempt is no longer needed after that patch. I will then remove
> it.
Hm? I don't have the same conclusion from what Andrea said.
When you have many allocations racing at the same time, they can all
enter __alloc_pages_may_oom() in quick succession. We don't want a
cavalcade of OOM kills when one could be enough, so we have to make
sure that in between should_alloc_retry() giving up and acquiring the
OOM lock nobody else already issued a kill and released enough memory.
It's a race window that gets yanked wide open when hundreds of threads
race in __alloc_pages_may_oom(). Your patches don't fix that, AFAICS.
--
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-28 21:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 16:38 Michal Hocko
2016-01-28 19:02 ` Andrea Arcangeli
2016-01-28 20:11 ` Michal Hocko
2016-01-28 21:12 ` Johannes Weiner [this message]
2016-01-28 21:55 ` Michal Hocko
2016-01-28 23:40 ` Johannes Weiner
2016-01-29 14:38 ` Michal Hocko
2016-01-29 15:56 ` Andrea Arcangeli
2016-01-29 16:12 ` Michal Hocko
2016-01-29 16:29 ` Michal Hocko
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=20160128211240.GA4163@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--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