login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
10
Re: [PATCH] x86: avoid unnecessary low zone allocation in AMD IOMMU's alloc_coherent
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: FUJITA Tomonori
Subject:
Re: [PATCH] x86: avoid unnecessary low zone allocation in AMD IOMMU's alloc_coherent
Date: Wednesday, September 10, 2008 - 10:15 am
On Wed, 10 Sep 2008 19:05:04 +0200 Joerg Roedel <joerg.roedel@amd.com> wrote:
quoted text
> On Thu, Sep 11, 2008 at 01:29:54AM +0900, FUJITA Tomonori wrote: > > On Wed, 10 Sep 2008 17:29:18 +0200 > > Joerg Roedel <joerg.roedel@amd.com> wrote: > > > > > On Thu, Sep 11, 2008 at 12:09:43AM +0900, FUJITA Tomonori wrote: > > > > On Wed, 10 Sep 2008 16:52:49 +0200 > > > > Joerg Roedel <joerg.roedel@amd.com> wrote: > > > > > > > > > On Wed, Sep 10, 2008 at 11:39:00PM +0900, FUJITA Tomonori wrote: > > > > > > > > > > > btw, in tip/x86/iommu, GART's alloc_coherent always does virtual > > > > > > mappings to allocate a size-aligned memory (as DMA-mapping.txt > > > > > > defines). > > > > > > > > > > > > Because someone strongly insisted, I modified GART's alloc_coherent to > > > > > > do so but as I said again and again, it's completely meaningless (only > > > > > > POWER IOMMU does it and drivers don't depend on such requirement). > > > > > > > > > > > > I guess that it would be better to do virtual mappings only when > > > > > > necessary as the current mainline does since GART I/O space is > > > > > > precious in some systems. But I don't care much. What's your opinion > > > > > > (as a AMD developer)? > > > > > > > > > > Very true. My original rewrite did the mapping only when necessary too. > > > > > What were the reasons to do the mapping always? > > > > > > > > As I said above, it's for allocating a size-aligned memory. Look at > > > > the description of pci_alloc_consistent in DMA-mapping.txt: > > > > > > > > The cpu return address and the DMA bus master address are both > > > > guaranteed to be aligned to the smallest PAGE_SIZE order which > > > > is greater than or equal to the requested size. This invariant > > > > exists (for example) to guarantee that if you allocate a chunk > > > > which is smaller than or equal to 64 kilobytes, the extent of the > > > > buffer you receive will not cross a 64K boundary. > > > > > > > > You can't do this with __get_free_pages easily (you need some hacks to > > > > do this). You can do this via iommu_area_alloc() for free. > > > > > > What hacks do you need with __get_free_pages? The memory it returns is > > > _always_ aligned at its size. > > > > Is it guaranteed (documented somewhere) ? > > I don't know if there is a formal definition for it. It is documented in > some books about the Linux kernel (I read this in some book the first > time). This alignment results from the buddy algorithm the page alloctor > uses. You can definitly rely on that.
I meant, if it's not documented as a guaranteed feature (not just the characteristic of the current code), it could change any time. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86: avoid unnecessary low zone allocation in AMD ...
, FUJITA Tomonori
, (Wed Sep 10, 4:19 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Ingo Molnar
, (Wed Sep 10, 4:57 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 5:03 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Ingo Molnar
, (Wed Sep 10, 5:18 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 5:38 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 5:48 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 6:03 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 6:10 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 6:37 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 6:53 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 7:24 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 7:38 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 7:39 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 7:45 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 7:52 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 8:09 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 8:29 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 9:29 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 10:05 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Wed Sep 10, 10:15 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Wed Sep 10, 10:25 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, Joerg Roedel
, (Thu Sep 11, 2:10 am)
Re: [PATCH] x86: avoid unnecessary low zone allocation in ...
, FUJITA Tomonori
, (Thu Sep 11, 6:36 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate