linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
To: linux-mm <linux-mm@kvack.org>
Cc: Roger Oksanen <roger.oksanen@cs.helsinki.fi>, Mel Gorman <mel@csn.ul.ie>
Subject: [RFC,PATCH 0/2] dmapool: allocation gfp changes
Date: Wed, 2 Dec 2009 15:18:35 +0200	[thread overview]
Message-ID: <200912021518.35877.roger.oksanen@cs.helsinki.fi> (raw)

Hi,
When introducing dma pools to the e100 driver, it was noticed that allocation
failure warnings were being generated to dmesg when allocations were being
retried (in dma_pool_alloc). Patch #1 changes the allocator to suppress most
warnings (a warning every 10th retry).

Patch #2, which applies on top of patch #1, changes the GFP_ATOMIC
allocation, which allows emergency pool usage, to use the callers GFP_*
flags. This is a scary change that can cause delays in the allocation path,
but is still imho the correct way. Discussion about this approach is welcome!

Additionally, I'm wondering if dma_pool_alloc(..) should be allowed to
fail after a while even when using __GFP_WAIT. Currently it loops forever
if it can't find the requested memory. A quick grep reveals that memory
allocation failures are handled in most drivers using (pci|dma)_pool_alloc.

PATCH 1/2
Don't warn when allowed to retry allocation.

PATCH 2/2
Honor GFP_* flags.

 mm/dmapool.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2009-12-02 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 13:18 Roger Oksanen [this message]
2009-12-02 13:20 ` [RFC,PATCH 1/2] dmapool: Don't warn when allowed to retry allocation Roger Oksanen
2009-12-02 19:56   ` Christoph Lameter
2009-12-02 21:22     ` Roger Oksanen
2009-12-02 13:23 ` [RFC,PATCH 2/2] dmapool: Honor GFP_* flags Roger Oksanen
2009-12-02 20:00   ` Christoph Lameter
2009-12-02 21:39     ` Roger Oksanen
2009-12-02 22:05       ` Christoph Lameter
2009-12-03 12:10     ` Mel Gorman

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=200912021518.35877.roger.oksanen@cs.helsinki.fi \
    --to=roger.oksanen@cs.helsinki.fi \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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