Re: Module loading (2.0.24) fails with "Unable to allocate DMA memory"

Jean Francois Martinez (
Wed, 6 Nov 1996 23:48:25 +0100

Date: Tue, 5 Nov 1996 22:41:34 +0000 (GMT)
From: Gerard Roudier <>
X-Sender: groudier@localhost
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 4 Nov 1996, Jean Francois Martinez wrote:

> When trying to load the floppy module I got "Unable to allocate DMA
> memory". Kernel 2.0.24. Exiting a couple of programs returns things
> to normal. In a general way when loading a module we need DMAable
> memory (ie physically contiguous and under 16 Megs barreer) but we are
> not under time pressure. Linux should be able to swap out some
> process in order to get space for its DMA memory. I don't know if the

Initial allocations are generally done with GFP_ATOMIC priority.
With that priority, it is not possible to wait for swapping, so such
allocation may fail. A driver that need memory must be able to try
later its memory allocations. If it is not able to do that, it is buggy.
That is my opinion.

I disagree on the soundnes of GFP_ATOMIC, we are starting a module, we
are not under time pressure I don't see the need why we deprive us of
the possibility of make room by swapping, it is not like when we must
serve an interrupt.

> problem is: Linux is supposed to make space but doesn't or if the DMA
> memory category does not fit and we need a GFP_DMAABLE category where
> we try to get memory fit for DMA but we can swap.

Using modules is great and allow us to spare memory and to have a shorter
kernel. However, ve must be aware that some drivers may have problems of
memory shortage when they are loaded. It is indeed the case for those
which need contiguous memory at initialisation or use ISA DMA.

The real importance of modules is: allowing the authors of
distributions to make installations where you can prescind of kernel
recompiling. As long as you have to recompile your kernel just after
installing, Linux will be an operating system for people with ten yars
of experience in computing. And there is a limited supply of them

ISA DMA is in my opinion some kind of bottleneck and may decrease
performances a lot. Use PCI interfaces each time it is possible for you.

They are very few 386DX with PCI bus! Yes that is my box for now :(
and that is the kinds of things who make me consider upgrading to
MkLinux (that is switching to Mac). But now Linux is getting its
share of commercial or half-commercial software and this is for Intel.
If only there was a compiler for translating Intel binaries to PowerPC
(I saw that kinfof things for translating to Alpha, free but
unfortunately for NT) then it would be Intel outside!


Ah did you notice I am french?


Jean Francois Martinez

-What is the operating system used by Bill Gates? -Linux of course. Do you think stupid people become millionnaire?