Re: DMA memory allocation

Stephen C. Tweedie (sct@redhat.com)
Thu, 15 Apr 1999 14:50:32 +0100 (BST)


Hi,

On Wed, 14 Apr 1999 14:45:19 +0200 (METDST), Stefan Ring
<e9725446@student.tuwien.ac.at> said:

> I know about the limitations that have to be considered when using DMA
> memory (contiguous space and <16MB). I'm interested in this topic because
> I get out of DMA memory messages almost every day when writing to XDF
> disks with mtools or xdfcopy.

> Theoretically, it must be possible to just move some adjacent pages out of
> <16MB memory area, update the page tables and use that freed memory as DMA
> memory henceforth, when DMA memory is requested.

That's fine if you can find the appropriate pages. There are always
risks concerning finding kernel data pages, slab pages, page table
pages or mlock()ed pages, none of which can be relocated. As a
result, the larger a region you are searching for, the harder it is to
satisfy.

We have been talking about working around this by reserving chunks of
memory for use only by swappable pages (that is, non-locked VM pages
or page cache/buffer cache pages), so that we can reclaim arbitrary
contiguous regions by forcing out address ranges in those blocks. If
we take this route, it will be a 2.3 feature, though.

Cheers,
Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/