Subject: Re: uvm_pglist alloc and WAITOK
To: Atsushi Onoe <onoe@sm.sony.co.jp>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 09/18/2001 14:11:37
On Tue, Sep 18, 2001 at 09:00:33PM +0900, Atsushi Onoe wrote:
> I never see the AGP code yet, but is it also hard for the AGP code to
> pool a small number of pages?
> 
> If the AGP code can split ioctl request into a repetation of pieces
> which only requires given few pages, allocation of the pages in attach
> would be reasonable.
> If the AGP code requires 256MB memory at once, it's hopeless, anyway.

The AGP memory allocation requests are already split into 2 parts:

	1) allocate. This only reserves some aperture memory, i.e.
	   it adds N to the counter of reserved memory and sets up
	   a bus_dma_map, but it isn't filled in yet.
	2) bind. This allocates the actual physical pages and puts
	   them into the GATT.

I know that at least the i810 driver in XF 4 wants to allocate 
and bind 8M. That's unfortunately too much to reserve at attach time.

- Frank

-- 
Frank van der Linden                           fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service.   http://www.wasabisystems.com/