Subject: Re: 1.6.2 kernel: ex driver sometimes can't allocate
To: Chapman Flack <>
From: Jochen Kunz <>
List: tech-kern
Date: 09/19/2004 10:35:00
On Sat, 18 Sep 2004 19:58:50 -0500
Chapman Flack <> wrote:

> I actually got it to attach last time by popping the card back out and
> then closing a few xterms and mozilla; shoved the card back in and it
> worked. How does *that* work - what resources are userland programs
> able to starve bus_dmamem_alloc of?
bus_dmamem_alloc(9) allocates a chunk of _continuous_pysical_ memory for
DMA. If a loaded system is running for some time and a rather large
chunk like a descriptor table needs to be allocated, the memory is to
fragmentated to get enough continuous free pages. Terminating memory
eaters like Mozilla often frees enough memory to satisfy the
bus_dmamem_alloc(9) request. Fragmentation is no problem for a process,
it uses virtual memory. The pysical memory behind it doesn't need to be
continuous. Every address goes through the MMU. But DMA operates on
pysical adresses without involveing the MMU, thus the requirement of
continuous pysical memory.