linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC,PATCH 0/2] dmapool: allocation gfp changes
@ 2009-12-02 13:18 Roger Oksanen
  2009-12-02 13:20 ` [RFC,PATCH 1/2] dmapool: Don't warn when allowed to retry allocation Roger Oksanen
  2009-12-02 13:23 ` [RFC,PATCH 2/2] dmapool: Honor GFP_* flags Roger Oksanen
  0 siblings, 2 replies; 9+ messages in thread
From: Roger Oksanen @ 2009-12-02 13:18 UTC (permalink / raw)
  To: linux-mm; +Cc: Roger Oksanen, Mel Gorman

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-12-03 12:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-02 13:18 [RFC,PATCH 0/2] dmapool: allocation gfp changes Roger Oksanen
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox