Re: DMA memory limitation?

From: Helge Hafting (
Date: Fri Jul 06 2001 - 03:59:18 EST

Vasu Varma P V wrote:
> Hi,
> Is there any limitation on DMA memory we can allocate using
> kmalloc(size, GFP_DMA)? I am not able to acquire more than
> 14MB of the mem using this on my PCI SMP box with 256MB ram.
> I think there is restriction on ISA boards of 16MB.
> Can we increase it ?

You can allocate a lot more memory for your pci activities.
No problem there. Just drop the "GFP_DMA" and you'll get
up to 1G or so.

You shouldn't use GFP_DMA because PCI cards don't need that.
Only ISA cards needs GFP_DMA because they can't use more
than 16M. So obviously GFP_DMA is limited to
16M because it is really ISA_DMA.

PCI don't need such special tricks, so don't use GFP_DMA!
Your PCI cards is able to DMA into any memory, including
the non-GFP_DMA memory.

> but we have a macro in include/asm-i386/dma.h,
> if i change it to a higher value, i am able to get more dma
> memory. Is there any way i can change this without compiling
> the kernel?
No matter what you do, DON'T change that. Yeah, you'll get
a bigger GFP_DMA pool, but that'll break each and every
ISA card that tries to allocate GFP_DMA memory. You
achieve exactly the same effect for your PCI card by ditching
the GFP_DMA parameter, but then you achieve it without breaking
ISA cards.

Helge Hafting
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:17 EST