Re: fork: out of memory

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Thu, 27 Nov 1997 13:14:19 +0100 (MET)


On Wed, 26 Nov 1997, John Alvord wrote:

> > But if we need a DMA buffer that is physically contiguous can't we
> > just move non-DMA pages around and adjust the page tables such that
> > logical addresses stay the same?
>
> Memory is getting so inexpensive in some environments, wouldn't it make
> sense to have an option to reserve DMA-able memory at init time? With 16
> megs going for $60, it is worth setting aside 4megs or 8 megs which would
> have to be specially requested.

128 k would be enough, the largest DMA buffer allocated by devices
is 64k in size (soundcard) and ftape uses 3 32k area's. the scsi
tape driver also uses quite some space, but also multiple 32k
regions. floppy driver needs a small piece of dma memory (xxk?)
and some network/scsi cards do.
If there are more than 4 dma-using drivers loaded, the kernel:
- tries to get a second 128k dma region (or 3 64k regions)
- doesn't allocate >32k chunks until the second region is added
- gives low priority to the sound driver (not enough 128k regions,
sound driver gets 16k)

furthermore, the process structs could be done in virtual memory,
hiding behind some page table... (can they??)

comments please,

Rik.