* pci_alloc_consistent question
@ 2001-10-19 18:32 MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 18:51 ` Francois Romieu
2001-10-19 20:57 ` Ralf Baechle
0 siblings, 2 replies; 6+ messages in thread
From: MEHTA,HIREN (A-SanJose,ex1) @ 2001-10-19 18:32 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org'
Hi List,
Is there any limitation on the amount of contiguous dmaable memory that
can be allocated using a single call to pci_alloc_consistent() ?
Regards,
-hiren
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pci_alloc_consistent question
2001-10-19 18:32 MEHTA,HIREN (A-SanJose,ex1)
@ 2001-10-19 18:51 ` Francois Romieu
2001-10-19 20:57 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Francois Romieu @ 2001-10-19 18:51 UTC (permalink / raw)
To: MEHTA,HIREN (A-SanJose,ex1); +Cc: 'linux-kernel@vger.kernel.org'
MEHTA,HIREN (A-SanJose,ex1) <hiren_mehta@agilent.com> :
[...]
> Is there any limitation on the amount of contiguous dmaable memory that
> can be allocated using a single call to pci_alloc_consistent() ?
See comment in arch/i386/kernel/pci-dma.c for pc world:
/*
* Dynamic DMA mapping support.
*
* On i386 there is no hardware dynamic DMA address translation,
* so consistent alloc/free are merely page allocation/freeing.
[...]
It fails as __get_free_pages does.
--
Ueimor
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pci_alloc_consistent question
2001-10-19 18:32 MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 18:51 ` Francois Romieu
@ 2001-10-19 20:57 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2001-10-19 20:57 UTC (permalink / raw)
To: MEHTA,HIREN (A-SanJose,ex1); +Cc: 'linux-kernel@vger.kernel.org'
On Fri, Oct 19, 2001 at 12:32:19PM -0600, MEHTA,HIREN (A-SanJose,ex1) wrote:
> Is there any limitation on the amount of contiguous dmaable memory that
> can be allocated using a single call to pci_alloc_consistent() ?
Entirely platform dependant. On some systems the total available DMA memory
for DMA may be as limited as 1mb, others have limits like 16mb yet other can
support the entire 32-bit address space for DMA. So in case of doubt be
conservative.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: pci_alloc_consistent question
@ 2001-10-19 21:24 MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 21:37 ` Jeff Garzik
2001-10-19 21:59 ` Ralf Baechle
0 siblings, 2 replies; 6+ messages in thread
From: MEHTA,HIREN (A-SanJose,ex1) @ 2001-10-19 21:24 UTC (permalink / raw)
To: 'Ralf Baechle', MEHTA,HIREN (A-SanJose,ex1)
Cc: 'linux-kernel@vger.kernel.org'
so, what is the conservative number ? 1MB ?
-hiren
-----Original Message-----
From: Ralf Baechle [mailto:ralf@uni-koblenz.de]
Sent: Friday, October 19, 2001 1:58 PM
To: MEHTA,HIREN (A-SanJose,ex1)
Cc: 'linux-kernel@vger.kernel.org'
Subject: Re: pci_alloc_consistent question
On Fri, Oct 19, 2001 at 12:32:19PM -0600, MEHTA,HIREN (A-SanJose,ex1) wrote:
> Is there any limitation on the amount of contiguous dmaable memory that
> can be allocated using a single call to pci_alloc_consistent() ?
Entirely platform dependant. On some systems the total available DMA memory
for DMA may be as limited as 1mb, others have limits like 16mb yet other can
support the entire 32-bit address space for DMA. So in case of doubt be
conservative.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pci_alloc_consistent question
2001-10-19 21:24 pci_alloc_consistent question MEHTA,HIREN (A-SanJose,ex1)
@ 2001-10-19 21:37 ` Jeff Garzik
2001-10-19 21:59 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2001-10-19 21:37 UTC (permalink / raw)
To: MEHTA,HIREN (A-SanJose,ex1)
Cc: 'Ralf Baechle', 'linux-kernel@vger.kernel.org'
"MEHTA,HIREN (A-SanJose,ex1)" wrote:
> so, what is the conservative number ? 1MB ?
FWIW, if you need more than 1-4MB, you can use alloc_bootmem at system
boot to reserve huge amounts of contiguous memory... (not that anything
but lame hardware requires that anymore)
> -----Original Message-----
> On Fri, Oct 19, 2001 at 12:32:19PM -0600, MEHTA,HIREN (A-SanJose,ex1) wrote:
>
> > Is there any limitation on the amount of contiguous dmaable memory that
> > can be allocated using a single call to pci_alloc_consistent() ?
>
> Entirely platform dependant. On some systems the total available DMA memory
> for DMA may be as limited as 1mb, others have limits like 16mb yet other can
> support the entire 32-bit address space for DMA. So in case of doubt be
> conservative.
--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: pci_alloc_consistent question
2001-10-19 21:24 pci_alloc_consistent question MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 21:37 ` Jeff Garzik
@ 2001-10-19 21:59 ` Ralf Baechle
1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2001-10-19 21:59 UTC (permalink / raw)
To: MEHTA,HIREN (A-SanJose,ex1); +Cc: 'linux-kernel@vger.kernel.org'
On Fri, Oct 19, 2001 at 03:24:14PM -0600, MEHTA,HIREN (A-SanJose,ex1) wrote:
> so, what is the conservative number ? 1MB ?
Even far below that. Most systems will allocate that memory using
get_free_pages and by allocating large pages such as 1mb you'll produce
high memory pressure. Try to get away with PAGE_SIZE * 2 if you can.
Large allocation are only ok if they're rare.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-10-19 22:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-19 21:24 pci_alloc_consistent question MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 21:37 ` Jeff Garzik
2001-10-19 21:59 ` Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2001-10-19 18:32 MEHTA,HIREN (A-SanJose,ex1)
2001-10-19 18:51 ` Francois Romieu
2001-10-19 20:57 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox