Allocating uge chunks of kernel memory

Stephen Williams (steve@icarus.icarus.com)
Sat, 07 Feb 1998 13:13:22 -0800


I have a board that has a non-chaining DMA controll, that is intended
to simulate scanner cameras. The board works by DMAing a gray image
from the host memory and sending it out through line drivers and a
connector, with frame and line valid signals synthesized.

My problem is that the DMA controller (AMCC S5933) does NOT support
chaining, and very little on-board FIFO. When the DMA runs out, the
board will pause until new DMA values are loaded.

I can get by with this for now, but I would rather allocate huge (2Meg)
buffers that are physically contiguous. I would prefer to be able to
do this from a loadable module. I see that I am limited in get_free_pages
to an order of 5, though. On a i389 style machine, I could use orders
up to 9 or 10.

I see in linux-2.0.32/mm/page_alloc.c that there is a table free_area
that has a fixed size, set by the constant NR_MEM_LISTS. Would it be
enough for me to just change this constant and rebuild? Is there
work in progress to either release this restriction or make it settable
on the fly (i.e. a configuration item in /proc or sysctl)?

I've run into this problem before. There are good engineering and economic
reasons for the "inexpensive" nature of this board and throwing host
memory at the problem is really cheaper then other alternatives.

Thanks,

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu