From: David Rientjes <rientjes@google.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mel@csn.ul.ie>,
Christoph Lameter <cl@linux-foundation.org>,
Dave Hansen <dave@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 3/3 -mmotm] oom: invoke oom killer for __GFP_NOFAIL
Date: Tue, 2 Jun 2009 01:14:40 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.0906020104480.27792@chino.kir.corp.google.com> (raw)
In-Reply-To: <20090602075836.GB16201@wotan.suse.de>
On Tue, 2 Jun 2009, Nick Piggin wrote:
> > I would really prefer if we do as Andrew suggests. Both will fix this
> > problem, so I don't see it as a different topic at all.
>
> Well, his patch, as it stands, is a good one. Because we do have
> potential higher order GFP_NOFAIL.
>
There's currently an inconsistency in the definition of __GFP_NOFAIL and
its implementation. The clearly defined purpose of the flag is:
* __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller
* cannot handle allocation failures.
Yet __GFP_NOFAIL allocations may fail if no progress is made via direct
reclaim and order > PAGE_ALLOC_COSTLY_ORDER. That's the behavior in the
git HEAD and Mel's allocator rework in mmotm.
I've been addressing this implicitly by requiring __GFP_NOFAIL to always
abide by the definition: we simply can never return NULL because the
caller can't handle it (and, by definition, shouldn't even be responsible
for considering it).
With my patch, we kill a memory hogging task that will free some memory so
the allocation will succeed (or multiple tasks if insufficient contiguous
memory is available). Kernel allocations use __GFP_NOFAIL, so the fault
of this memory freeing is entirely on the caller, not the page allocator.
My preference for handling this is to merge my patch (obviously :), and
then hopefully deprecate __GFP_NOFAIL as much as possible although I don't
suspect it could be eradicated forever.
next prev parent reply other threads:[~2009-06-02 8:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 1:31 [patch 1/3 -mmotm] oom: move oom_adj value from task_struct to mm_struct David Rientjes
2009-06-02 1:31 ` [patch 2/3 -mmotm] oom: avoid unnecessary mm locking and scanning for OOM_DISABLE David Rientjes
2009-06-02 1:31 ` [patch 3/3 -mmotm] oom: invoke oom killer for __GFP_NOFAIL David Rientjes
2009-06-02 5:56 ` Andrew Morton
2009-06-02 6:27 ` Nick Piggin
2009-06-02 6:41 ` Pekka Enberg
2009-06-02 7:26 ` David Rientjes
2009-06-02 7:34 ` Peter Zijlstra
2009-06-02 7:58 ` Nick Piggin
2009-06-02 8:14 ` David Rientjes [this message]
2009-06-03 22:10 ` David Rientjes
2009-06-03 22:26 ` Andrew Morton
2009-06-03 22:54 ` Divy Le Ray
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.00.0906020104480.27792@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=npiggin@suse.de \
--cc=riel@redhat.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
all inboxes | Powered by JetHome®