Subject: Re: KVA usage of old-style buffers
To: Frank van der Linden <>
From: Chuck Silvers <>
List: tech-kern
Date: 10/01/2001 19:52:58
putting an upper bound on the amount of KVA used for buffers
is a fine thing for now, for all ports, especially ones that
can have large amounts of RAM or that have less KVA to begin with.
eventually it would be good to enhance the buffer cache to be
more efficient in its use of KVA, but that isn't critical yet.


On Tue, Oct 02, 2001 at 12:08:11AM +0200, Frank van der Linden wrote:
> Due to a mistake I made in the AGP code, I realized something about
> the old-style buffer usage. I made the AGP code always map the graphics
> aperture into kernel virtual memory, using pci_mapreg_map. This
> wasn't needed, and I've corrected that.
> However, I noticed that on my main system (dual Athlon, 1G of RAM),
> I couldn't even map a 64MB sized graphics aperture. The i386 port
> has 1G of KVM, but it turns out that, even that early in autoconfig,
> 64M wasn't even available anymore.
> The bad guy here is the buffer code, eating up MAXBSIZE * nbuf
> bytes of kva. This amounts to some 740MB on my system. This seems
> to be way too much, since we now have UBC, and vfs_cluster.c
> has been nuked.
> I'm going to put a cap on this on the i386 port (again), but
> I was wondering if this shouldn't be done for all ports.
> - Frank
> -- 
> Frank van der Linden                 
> ======================================================================
> Quality NetBSD CDs, Support & Service.