From: Joerg Roedel <joerg.roedel@amd.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
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
Date: Thu, 4 Sep 2008 11:49:33 +0200 [thread overview]
Message-ID: <20080904094933.GR3189@amd.com> (raw)
In-Reply-To: <20080904083124.GA18288@one.firstfloor.org>
On Thu, Sep 04, 2008 at 10:31:24AM +0200, Andi Kleen wrote:
> > Even if it's tree, only each IOMMU knows what's the best. That's the
> > point of these changes to remove the tricks in arch/x86/pci-dma.c and
> > let IOMMUs do what they want.
>
> Duplicating all the code. Sounds great.
Even greater is that hardware IOMMUs now don't pay the penalty of this
completly unnecessary alloc-free cycle in the generic dma_alloc_coherent
function and that now finally the driver specific free_coherent function
is called. And this all to the cost of minimal code duplication. If you
look into the patches you see that the old retry-loop is now in
pci-nommu.c where it belongs to. The GART also only needs small parts of
the old logic which are now in a specific alloc_coherent function for
this driver.
> > > Also there's usually the problem that not all busses are translated,
> > > e.g. Calgary used to do that so for e.g. dev == NULL allocations you had
> > > to use these fallback algorithms anyways.
> >
> > dev == NULL isn't a minor thing. It's just using the fallback
> > device.
>
> You still have to handle it fully.
Thats why the handling of dev == NULL is still in the dma_alloc_coherent
function and should also stay there.
Joerg
--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
prev parent reply other threads:[~2008-09-04 9:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 15:03 [PATCH] swiotlb: fix dma_alloc_coherent allocation failures with swiotlb Joerg Roedel
2008-09-03 18:04 ` [PATCH 0/3] fix swiotlb allocation gfp flag FUJITA Tomonori
2008-09-03 18:04 ` [PATCH 1/3] x86: remove the NULL device hack in dma-mapping.h FUJITA Tomonori
2008-09-03 18:04 ` [PATCH 2/3] x86: set gfp flag properly for swiotlb_alloc_coherent FUJITA Tomonori
2008-09-03 18:04 ` [PATCH 3/3] swiotlb: use GFP_DMA32 instead of GFP_DMA in swiotlb_alloc_coherent FUJITA Tomonori
2008-09-03 20:05 ` Joerg Roedel
2008-09-04 4:11 ` FUJITA Tomonori
2008-09-03 18:54 ` [PATCH 1/3] x86: remove the NULL device hack in dma-mapping.h FUJITA Tomonori
2008-09-03 20:01 ` Joerg Roedel
2008-09-04 4:11 ` FUJITA Tomonori
2008-09-04 10:00 ` Joerg Roedel
2008-09-04 12:50 ` FUJITA Tomonori
2008-09-03 18:05 ` [PATCH] swiotlb: fix dma_alloc_coherent allocation failures with swiotlb FUJITA Tomonori
2008-09-03 19:54 ` Joerg Roedel
2008-09-03 20:11 ` Joerg Roedel
2008-09-04 4:11 ` FUJITA Tomonori
2008-09-03 22:09 ` Andi Kleen
2008-09-04 4:11 ` FUJITA Tomonori
2008-09-04 7:44 ` Andi Kleen
2008-09-04 7:58 ` FUJITA Tomonori
2008-09-04 8:05 ` Andi Kleen
2008-09-04 8:18 ` FUJITA Tomonori
2008-09-04 8:31 ` Andi Kleen
2008-09-04 9:49 ` Joerg Roedel [this message]
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=20080904094933.GR3189@amd.com \
--to=joerg.roedel@amd.com \
--cc=andi@firstfloor.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox