Subject: Re: buffer cache memory management revision
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 12/01/2003 13:15:19
Paul Kranenburg wrote:

> Here's a complete set of patches for the new buffer cache memory
> allocation scheme, including MD changes for all platforms.
> 
> The MD changes on most platforms are straightforward but some need
> special attention: the alpha, mips and vax use the buffer cache
> parameters early in the bootstrap process to size up kernel mapping
> resources.  I've provided an alternative for the `(nbuf * MAXBSIZE)'
> expression used for that in various pmap modules, for which I'm now
> solliciting feed-back.

I had to remove the allocsys() calls from sbmips/sbmips/machdep.c to
build for sbmips and then shift the results of buf_memcalc() by pagesize
on the mips pmap Sysmapsize calculation (the sysmap size is in pages).
I dunno if other archs (alpha, vax) need pages or bytes for their
calculations - maybe make buf_memcalc() return pages or even call it
bufpages_memcalc()?

  old sysmapsize         =   42778
  broken new sysmapsize  = 6754378
  working new sysmapsize =   18103

The resulting kernel works fine on sbmips and evbmips/walnut so far, but
I haven't put it under too much load - just built a couple of packages.

Oh, and "sysstat bufcache" will need updating :-)  I'll try to have
a look at that if you don't.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/