lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 4 Sep 2008 11:49:33 +0200
From:	Joerg Roedel <joerg.roedel@....com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>, mingo@...hat.com,
	tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
	iommu@...ts.linux-foundation.org, kamezawa.hiroyu@...fujitsu.com,
	tony.luck@...el.com
Subject: Re: [PATCH] swiotlb: fix dma_alloc_coherent allocation failures with swiotlb

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ