[Prism54-devel] failure to allocate DMA memory (bug #26)
Jens Maurer
Jens.Maurer@gmx.net
Fri, 09 Jan 2004 22:32:35 +0100
Hello!
I've had a look at the open bugs in the bugzilla tracker.
This one deals with an error return from pci_alloc_consistent():
http://prism54.org/cgi-bin/bugzilla/show_bug.cgi?id=26
The problem here is that our call to pci_alloc_consistent()
ends up trying to allocate 256 KB of contiguous RAM.
It always succeeds on my machine with 256 MB of RAM, but
on machines that have less RAM, or where the memory is more
fragmented because the kernel has been running for some
time, it is conceivable for this to fail.
The memory block that we allocate serves several
purposes:
- control block memory (1 KB)
- frame buffer memory for power save mode (about 100 KB)
- memory for the management fragments (48 KB)
This is rounded up to the next power of two, which is 256 KB.
I suggest separating the allocations as follows:
- control block
- frame buffer memory for power save mode (reduce the
allocation size until it succeeds, with a "printk";
for usual home setups, 8 KB or so should be enough)
- the management frames
I can do that, but probably someone doesn't like the
idea?
Jens Maurer