mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Pekka J Enberg <penberg@cs.Helsinki.FI>
Cc: linux-kernel@vger.kernel.org, reiserfs-dev@namesys.com
Subject: Re: [PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation
Date: Thu, 12 Jan 2006 23:55:48 -0800	[thread overview]
Message-ID: <20060112235548.0e1e4343.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0601130944360.20349@sbz-30.cs.Helsinki.FI>

Pekka J Enberg <penberg@cs.Helsinki.FI> wrote:
>
> Hi,
> 
> Pekka J Enberg <penberg@cs.Helsinki.FI> wrote:
> > >
> > >  -      retry:
> > >  -	jl = kzalloc(sizeof(struct reiserfs_journal_list), GFP_NOFS);
> > >  -	if (!jl) {
> > >  -		yield();
> > >  -		goto retry;
> > >  -	}
> > >  +	jl = kzalloc(sizeof(struct reiserfs_journal_list),
> > >  +		     GFP_NOFS | __GFP_NOFAIL);
> 
> On Thu, 12 Jan 2006, Andrew Morton wrote:
> > yup, that's what __GFP_NOFAIL is for: to consolidate and identify all those
> > places which want to lock up when we're short of memory...  They all need
> > fixing, really.
> 
> Out of curiosity, are there any potential problems with combining GFP_NOFS 
> and __GFP_NOFAIL? Can we really guarantee to give out memory if we're not 
> allowed to page out?
> 

GFP_NOFS increases the risk (relative to GFP_KERNEL) because page reclaim
can do less things than GFP_KERNEL to free memory.

GFP_NOFS allocations can still perform swapspace writes, however.  GFP_NOIO
cannot even do that.

  reply	other threads:[~2006-01-13  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13  7:33 Pekka J Enberg
2006-01-13  7:42 ` Andrew Morton
2006-01-13  7:46   ` Pekka J Enberg
2006-01-13  7:55     ` Andrew Morton [this message]
2006-01-13 21:44       ` Hans Reiser

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=20060112235548.0e1e4343.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.Helsinki.FI \
    --cc=reiserfs-dev@namesys.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®