From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755791AbYIDHll (ORCPT ); Thu, 4 Sep 2008 03:41:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751892AbYIDHle (ORCPT ); Thu, 4 Sep 2008 03:41:34 -0400 Received: from one.firstfloor.org ([213.235.205.2]:46146 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbYIDHld (ORCPT ); Thu, 4 Sep 2008 03:41:33 -0400 Date: Thu, 4 Sep 2008 09:44:41 +0200 From: Andi Kleen To: FUJITA Tomonori Cc: andi@firstfloor.org, joerg.roedel@amd.com, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, kamezawa.hiroyu@jp.fujitsu.com, tony.luck@intel.com Subject: Re: [PATCH] swiotlb: fix dma_alloc_coherent allocation failures with swiotlb Message-ID: <20080904074441.GY18288@one.firstfloor.org> References: <1220454224-25985-1-git-send-email-joerg.roedel@amd.com> <877i9sx4nk.fsf@basil.nowhere.org> <20080904131130E.fujita.tomonori@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080904131130E.fujita.tomonori@lab.ntt.co.jp> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 04, 2008 at 01:11:47PM +0900, FUJITA Tomonori wrote: > On Thu, 04 Sep 2008 00:09:51 +0200 > Andi Kleen wrote: > > > Joerg Roedel writes: > > > > > 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. > > > > The high level dma_alloc_coherent() does that anyways. > > The high level dma_alloc_coherent means the tricks in > arch/x86/pci-dma.c? If so, all the tricks has gone in tip/master. Seems wrong -- that is something that is needed by multiple IOMMUs. Pretty much all which work with real memory instead of virtual mappings. I also have an older swiotlb rewrite in the pipeline based on the DMA allocator. The project got a little sidelined, but I hope to eventually forward port it again. -Andi -- ak@linux.intel.com