Skip to contentSkip to conversation

A question about ZONE_DMA

DISCUSSION Casey Dahlin 5 participants 6 messages Oct 13, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

So if I understand correctly, ZONE_DMA exists to separate and preserve the chunk of memory to which older ISA cards are capable of doing DMA. The question that arises for me is:

1) Why do /all/ 32-bit boxes have a ZONE_DMA when surely only a tiny and shrinking number of them have a need for it?

2) Why do /any/ 64-bit boxes have a ZONE_DMA? Is there really some godless monster out there who put an early ISA bridge and a 64-bit CPU on the same motherboard?!

Can someone shed light on what I'm missing?

--CJD

#1 lore raw
Quoted 4 lines · Casey Dahlin

So if I understand correctly, ZONE_DMA exists to separate and preserve the chunk of memory to which older ISA cards are capable of doing DMA. The question that arises for me is:

Quoted 8 lines

1) Why do all 32-bit boxes have a ZONE_DMA when surely only a tiny and shrinking number of them have a need for it?

2) Why do any 64-bit boxes have a ZONE_DMA? Is there really some godless monster out there who put an early ISA bridge and a 64-bit CPU on the same motherboard?!

Can someone shed light on what I'm missing?

There are some ISA devices that have become standard components, like floppy drives. A lot of PCs still have connectors for floppies even though they are hardly used these days.

Some architectures define ZONE_DMA in a different way, e.g. as the lower 2 GB because of device restrictions on 64 bit systems.

Arnd

#2 lore raw
In reply to Casey Dahlin

Am Mittwoch, 13. Oktober 2010, 16:52:41 schrieb Casey Dahlin:

Quoted 8 lines

Hi all,

So if I understand correctly, ZONE_DMA exists to separate and preserve the chunk of memory to which older ISA cards are capable of doing DMA. The question that arises for me is:

1) Why do /all/ 32-bit boxes have a ZONE_DMA when surely only a tiny and shrinking number of them have a need for it?

You don't know before you load the module of the driver that needs it.

Quoted 3 lines

2) Why do /any/ 64-bit boxes have a ZONE_DMA? Is there really some godless monster out there who put an early ISA bridge and a 64-bit CPU on the same motherboard?!

Parports can use DMA and are generally ISA.

Regards
Oliver

#4 lore raw
Quoted 2 lines · Casey Dahlin

Thanks for the quick replies. My youth affords me the luxury of not knowing much about floppy drives or parports :). All makes sense now.

In addition it is used as fallback for all kinds of other DMA which is less than 32bits. e.g. there used to be popular systems with 31 or 29 bits addressing capability.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.
#5 lore raw
In reply to Casey Dahlin
Quoted 9 lines · Casey Dahlin

Hi all,

So if I understand correctly, ZONE_DMA exists to separate and preserve the chunk of memory to which older ISA cards are capable of doing DMA. The question that arises for me is:

1) Why do /all/ 32-bit boxes have a ZONE_DMA when surely only a tiny and shrinking number of them have a need for it?

If you don't need it, disable CONFIG_ZONE_DMA, which is useful to prevent oom conditions when lowmem_reserve_ratio reserves memory in that zone that you'll never need to save.

If you do disable that option, you may also want to look at disabling CONFIG_GENERIC_ISA_DMA and CONFIG_ISA_DMA_API which you need to hack a little to get to compile. I'll send a patch to fix that.