Re: [PATCH] swiotlb: fix dma_alloc_coherent allocation failureswith swiotlb
From: FUJITA Tomonori
Date: Wed Sep 03 2008 - 14:06:47 EST
On Wed, 3 Sep 2008 17:03:44 +0200
Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
> The SWIOTLB version of dma_alloc_coherent allocates all memory with
> GFP_DMA unconditionally. This leads sometimes unnecessary to allocation
> failures. This patch makes the allocation strategy to use the DMA32 zone
> first if this is possible. The changes are boot tested on AMD64 and
> compile tested for i386 and IA64.
>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Cc: tony.luck@xxxxxxxxx
> Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
> ---
> lib/swiotlb.c | 23 +++++++++++++++++------
> 1 files changed, 17 insertions(+), 6 deletions(-)
This doesn't look correct since IA64 doesn't need this flag hack.
Another problem about this patch is that swiotlb doesn't use GFP_DMA
for the fallback_dev.
I'll send patches to fix this problem differently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/