Subject: Re: Support for PMAG-C upwards almost ready ;)
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 03/02/1999 16:08:50
>Actually, it's trivial to handle this.  Use the multiple prioritized
>memory freelist support in UVM.  See the i386 port for an example.  Note
>how it places RAM <= 16M onto a freelist which is allocated from only
>when there are no pages available on the >16M freelist.

Um, where in the i386 port? I did look, and what I found was a comment
in machdep.c from Nov 1997 saying that, indeed, buffer allocation had
to be deferred:).  Should that comment be gc'ed?


>Then, the bus_dma allocator can have a better chance of getting the
>memory it needs (which is handled in MI code for you already).  I.e.
>all you need to solve this problem is multiple free lists.

So if we set up multiple UVM lists, and then:
	1) do a bus_dmamap_create() with nsegments == 1
	   and boundary == 128k
	2) do a bus_dmamem_alloc() with boundary == 8megs and
	   nsegs == 1

then the MI bus-space stuff will make it all Just Work, at least for
kernel accesses? Or do we need to defer bufpage allocation too?


That still leaves a hole for the Xserver, though.  We really need the
old NOSYNC semantics, so that accesses from userspace to an mmap()ed
area holding the bltter cmd-packet DMA buffer dont require explicit
sync operations.