* IA64 without ZONE_DMA?
@ 2006-09-22 23:30 Christoph Lameter
2006-09-23 1:18 ` KAMEZAWA Hiroyuki
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Christoph Lameter @ 2006-09-22 23:30 UTC (permalink / raw)
To: linux-ia64
There is code in Andrews tree that allows getting rid of ZONE_DMA. I know
that SGI machines do not use ZONE_DMA. I looked through the arch code and
I do not see ZONE_DMA or GFP_DMA uses that I cannot account for. However,
I am not familiar with the code for other IA64 platforms.
This patch will make IA64 have a single zone in each node. As a result
loops are unrolled, various VM macros can be optimized further and the
memory load balancing code between different zones in one node is no
longer necessary. Note that having no ZONE_DMA means that GFP_DMA will be
ignored. If you know of any devices depending on ZONE_DMA (memory returned
must be below 4GB) then we first need to deal with those possibly by
modifying dma_alloc_coherent functions to obtain memory in a different
way than via GFP_DMA.
We are currently working on a new page allocator function
alloc_pages_range()
that will allow the specification of a memory range for devides that have
other needs. This will allow an allocation for arbitrary address ranges
without ZONE_DMA.
Would it be possible to check how other platforms work without ZONE_DMA?
I can help to fix things up using alloc_pages_range() if necessary?
Index: linux-2.6.18-rc7-mm1/arch/ia64/Kconfig
=================================--- linux-2.6.18-rc7-mm1.orig/arch/ia64/Kconfig 2006-09-19 09:26:09.000000000 -0500
+++ linux-2.6.18-rc7-mm1/arch/ia64/Kconfig 2006-09-22 18:17:29.150336964 -0500
@@ -22,10 +22,6 @@ config 64BIT
bool
default y
-config ZONE_DMA
- def_bool y
- depends on !IA64_SGI_SN2
-
config MMU
bool
default y
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IA64 without ZONE_DMA?
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
@ 2006-09-23 1:18 ` KAMEZAWA Hiroyuki
2006-09-23 1:38 ` Christoph Lameter
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: KAMEZAWA Hiroyuki @ 2006-09-23 1:18 UTC (permalink / raw)
To: linux-ia64
On Fri, 22 Sep 2006 16:30:20 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:
> There is code in Andrews tree that allows getting rid of ZONE_DMA. I know
> that SGI machines do not use ZONE_DMA. I looked through the arch code and
> I do not see ZONE_DMA or GFP_DMA uses that I cannot account for. However,
> I am not familiar with the code for other IA64 platforms.
>
> This patch will make IA64 have a single zone in each node. As a result
> loops are unrolled, various VM macros can be optimized further and the
> memory load balancing code between different zones in one node is no
> longer necessary. Note that having no ZONE_DMA means that GFP_DMA will be
> ignored. If you know of any devices depending on ZONE_DMA (memory returned
> must be below 4GB) then we first need to deal with those possibly by
> modifying dma_alloc_coherent functions to obtain memory in a different
> way than via GFP_DMA.
>
> We are currently working on a new page allocator function
>
> alloc_pages_range()
>
looks atractive :) But how to use it ? the devices(codes) can know their
necessary and available address range on any platform ?
-Kame
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IA64 without ZONE_DMA?
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
2006-09-23 1:18 ` KAMEZAWA Hiroyuki
@ 2006-09-23 1:38 ` Christoph Lameter
2006-09-23 20:05 ` Jes Sorensen
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2006-09-23 1:38 UTC (permalink / raw)
To: linux-ia64
On Sat, 23 Sep 2006, KAMEZAWA Hiroyuki wrote:
> looks atractive :) But how to use it ? the devices(codes) can know their
> necessary and available address range on any platform ?
Yes. The PCI DMA layer can provide that information with the dma_mask.
And the good thing is that this is independent of how an architecture sets
up their ZONE_DMA.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IA64 without ZONE_DMA?
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
2006-09-23 1:18 ` KAMEZAWA Hiroyuki
2006-09-23 1:38 ` Christoph Lameter
@ 2006-09-23 20:05 ` Jes Sorensen
2006-09-24 1:59 ` Christoph Lameter
2006-09-25 19:17 ` Jes Sorensen
4 siblings, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2006-09-23 20:05 UTC (permalink / raw)
To: linux-ia64
>>>>> "Christoph" = Christoph Lameter <clameter@sgi.com> writes:
Christoph> There is code in Andrews tree that allows getting rid of
Christoph> ZONE_DMA. I know that SGI machines do not use ZONE_DMA. I
Christoph> looked through the arch code and I do not see ZONE_DMA or
Christoph> GFP_DMA uses that I cannot account for. However, I am not
Christoph> familiar with the code for other IA64 platforms.
Christoph> This patch will make IA64 have a single zone in each
Christoph> node. As a result loops are unrolled, various VM macros can
Christoph> be optimized further and the memory load balancing code
Christoph> between different zones in one node is no longer
Christoph> necessary. Note that having no ZONE_DMA means that GFP_DMA
Christoph> will be ignored. If you know of any devices depending on
Christoph> ZONE_DMA (memory returned must be below 4GB) then we first
Christoph> need to deal with those possibly by modifying
Christoph> dma_alloc_coherent functions to obtain memory in a
Christoph> different way than via GFP_DMA.
If you want to take this path, are you then planning to move the < 4GB
memory into ZONE_DMA32? We need a way to allocate memory within the
4GB zone for 32 bit DMA devices, especially on systems without an
IOMMU. In fact, it's attractive to be able to get memory in the 4GB
zone when possible even if a device supports DAC as it reduces the
number of bus transactions since it can be done with a single address
cycle instead of a dual.
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IA64 without ZONE_DMA?
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
` (2 preceding siblings ...)
2006-09-23 20:05 ` Jes Sorensen
@ 2006-09-24 1:59 ` Christoph Lameter
2006-09-25 19:17 ` Jes Sorensen
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2006-09-24 1:59 UTC (permalink / raw)
To: linux-ia64
On Sat, 23 Sep 2006, Jes Sorensen wrote:
> If you want to take this path, are you then planning to move the < 4GB
> memory into ZONE_DMA32? We need a way to allocate memory within the
> 4GB zone for 32 bit DMA devices, especially on systems without an
> IOMMU. In fact, it's attractive to be able to get memory in the 4GB
> zone when possible even if a device supports DAC as it reduces the
> number of bus transactions since it can be done with a single address
> cycle instead of a dual.
IA64 has no ZONE_DMA32. ZONE_DMA has a 4GB boundary for some architectures
on IA64. The new page allocator call alloc_pages_range() would be able to
allocate pages below the 4GB without having a ZONE_DMA (if necessary
for 32 bit devices without proper IOMMU support).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IA64 without ZONE_DMA?
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
` (3 preceding siblings ...)
2006-09-24 1:59 ` Christoph Lameter
@ 2006-09-25 19:17 ` Jes Sorensen
4 siblings, 0 replies; 6+ messages in thread
From: Jes Sorensen @ 2006-09-25 19:17 UTC (permalink / raw)
To: linux-ia64
>>>>> "Christoph" = Christoph Lameter <clameter@sgi.com> writes:
Christoph> On Sat, 23 Sep 2006, Jes Sorensen wrote:
>> If you want to take this path, are you then planning to move the <
>> 4GB memory into ZONE_DMA32? We need a way to allocate memory within
>> the 4GB zone for 32 bit DMA devices, especially on systems without
>> an IOMMU. In fact, it's attractive to be able to get memory in the
>> 4GB zone when possible even if a device supports DAC as it reduces
>> the number of bus transactions since it can be done with a single
>> address cycle instead of a dual.
Christoph> IA64 has no ZONE_DMA32. ZONE_DMA has a 4GB boundary for
Christoph> some architectures on IA64. The new page allocator call
Christoph> alloc_pages_range() would be able to allocate pages below
Christoph> the 4GB without having a ZONE_DMA (if necessary for 32 bit
Christoph> devices without proper IOMMU support).
I know the current code might not do whats really the right thing, but
I wanted to make sure we didn't prevent it in the future. If
alloc_pages_range() can do the job then that should be fine.
Cheers,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-09-25 19:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 23:30 IA64 without ZONE_DMA? Christoph Lameter
2006-09-23 1:18 ` KAMEZAWA Hiroyuki
2006-09-23 1:38 ` Christoph Lameter
2006-09-23 20:05 ` Jes Sorensen
2006-09-24 1:59 ` Christoph Lameter
2006-09-25 19:17 ` Jes Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox