public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Divy Le Ray <divy@chelsio.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>,
	npiggin@suse.de, a.p.zijlstra@chello.nl, riel@redhat.com,
	mel@csn.ul.ie, cl@linux-foundation.org, dave@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>
Subject: Re: [patch 3/3 -mmotm] oom: invoke oom killer for __GFP_NOFAIL
Date: Wed, 03 Jun 2009 15:54:58 -0700	[thread overview]
Message-ID: <4A26FF42.1020104@chelsio.com> (raw)
In-Reply-To: <20090603152616.ec5ba9af.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Wed, 3 Jun 2009 15:10:38 -0700 (PDT)
> David Rientjes <rientjes@google.com> wrote:
>
>   
>> On Tue, 2 Jun 2009, David Rientjes wrote:
>>
>>     
>>> 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.
>>>
>>>       
>> I really hope this patch isn't getting dropped because it fixes the 
>> possibility that a __GFP_NOFAIL allocation will fail when its definition 
>> is to the contrary.  Depending on the size of the allocation, that can 
>> cause a panic in at least the reiserfs, ntfs, cxgb3, and gfs2 cases.
>>
>> As I mentioned before, it's a noble goal to deprecate __GFP_NOFAIL as much 
>> as possible and (at the least) prevent it from trying high-order 
>> allocation attempts.  The current implementation of the flag is 
>> problematic, however, and this patch addresses it by attempting to free 
>> some memory when direct reclaim fails.
>>
>>     
>
> Sigh, all right, but we suck.
>
> Divy, could we please at least remove __GFP_NOFAIL from
> drivers/net/cxgb?  It's really quite inappropriate for a driver to
> assume that core VM can do magic.  Drivers should test the return value
> and handle the -ENOMEM in the old-fashioned way, please.
>   

We started working on it, and got to eliminate them out of 
cxgb3_main.c::init_tp_parity().
We're still looking at eliminating its use in 
cxgb3_offload.c::t3_process_tid_release_list().
I'll post the patches as soon as they are ready.

cheers,
Divy


      reply	other threads:[~2009-06-03 23:04 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
2009-06-03 22:10             ` David Rientjes
2009-06-03 22:26               ` Andrew Morton
2009-06-03 22:54                 ` Divy Le Ray [this message]

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=4A26FF42.1020104@chelsio.com \
    --to=divy@chelsio.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=jens.axboe@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox