All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nick Piggin <npiggin@suse.de>, 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, 02 Jun 2009 09:34:55 +0200	[thread overview]
Message-ID: <1243928095.23657.5633.camel@twins> (raw)
In-Reply-To: <alpine.DEB.2.00.0906020016060.24915@chino.kir.corp.google.com>

On Tue, 2009-06-02 at 00:26 -0700, David Rientjes wrote:
> > I really think/hope/expect that this is unneeded.
> > 
> > Do we know of any callsites which do greater-than-order-0 allocations
> > with GFP_NOFAIL?  If so, we should fix them.
> > 
> > Then just ban order>0 && GFP_NOFAIL allocations.
> > 
> 
> That seems like a different topic: banning higher-order __GFP_NOFAIL 
> allocations or just deprecating __GFP_NOFAIL altogether and slowly 
> switching users over is a worthwhile effort, but is unrelated.
> 
> This patch is necessary because we explicitly deny the oom killer from 
> being used when the order is greater than PAGE_ALLOC_COSTLY_ORDER because 
> of an assumption that it won't help.  That assumption isn't always true, 
> especially for large memory-hogging tasks that have mlocked large chunks 
> of contiguous memory, for example.  The only thing we do know is that 
> direct reclaim has not made any progress so we're unlikely to get a 
> substantial amount of memory freeing in the immediate future.  Such an 
> instance will simply loop forever without killing that rogue task for a 
> __GFP_NOFAIL allocation.
> 
> So while it's better in the long-term to deprecate the flag as much as 
> possible and perhaps someday remove it from the page allocator entirely, 
> we're faced with the current behavior of either looping endlessly or 
> freeing memory so the kernel allocation may succeed when direct reclaim 
> has failed, which also makes this a rare instance where the oom killer 
> will never needlessly kill a task.

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.

Eradicating __GFP_NOFAIL is a fine goal, but very hard work (people have
been wanting to do that for many years). But simply limiting it to
0-order allocation should be much(?) easier.



  reply	other threads:[~2009-06-02  7:35 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 [this message]
2009-06-02  7:58         ` Nick Piggin
2009-06-02  8:14           ` David Rientjes
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=1243928095.23657.5633.camel@twins \
    --to=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 \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.