All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: __GFP flags and kmalloc failures
Date: Tue, 02 Nov 2004 19:31:39 +0100	[thread overview]
Message-ID: <4187D28B.5060507@drzeus.cx> (raw)
In-Reply-To: <20041102152629.GH32054@logos.cnet>

Marcelo Tosatti wrote:

>On Tue, Nov 02, 2004 at 07:01:55PM +0100, Pierre Ossman wrote:
>  
>
>>Is there any other way of increasing the chances of actually getting the 
>>pages I need? Since it is DMA it needs to be one big block.
>>    
>>
>
>__GFP_NOFAIL, from gfp.h:
>
> * Action modifiers - doesn't change the zoning
> *
> * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt
> * _might_ fail.  This depends upon the particular VM implementation.
> *
> * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller
> * cannot handle allocation failures.
> *
> * __GFP_NORETRY: The VM implementation must not retry indefinitely.
> */
>
>  
>
Yes, I've browsed through these. __GFP_NOFAIL seems like it can hang for 
a very long time (I don't know if there is an upper bound on how long it 
will have to wait for a free page). __GFP_REPEAT seems to work good 
enough in this case.
My question was meant to be more along the lines of "Is there anything I 
can do without resorting to unstable/interal API:s?".

Rgds
Pierre


  reply	other threads:[~2004-11-02 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-02 15:49 __GFP flags and kmalloc failures Pierre Ossman
2004-11-02 14:44 ` Marcelo Tosatti
2004-11-02 18:01   ` Pierre Ossman
2004-11-02 15:26     ` Marcelo Tosatti
2004-11-02 18:31       ` Pierre Ossman [this message]
2004-11-02 15:55         ` Marcelo Tosatti
2004-11-02 19:06           ` Pierre Ossman

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=4187D28B.5060507@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.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.