Subject: change BUFPAGES warnings in sys/ufs/lfs/lfs_vfsops.c ?
To: None <tech-kern@NetBSD.org>
From: Jeff Rizzo <riz@NetBSD.org>
List: tech-kern
Date: 11/12/2005 15:38:17
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig59201EC78E276964D78D2B20
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Bear with me on this;  I don't pretend to understand the buffer cache in
any kind of detail at all, I'm just trying to figure out what changes I
should make to my system, and perhaps suggest changing the warnings.

I have an LFS volume on one of my dev boxes, and the other day I noticed
this warning:

lfs_mountfs: entire ifile of length 5431296 cannot fit in 4987520 buffer
bytes
lfs_mountfs: please consider increasing BUFPAGES to at least 4880


... upon poking around a bit, I learned a little about our buffer cache,
and if I understand things correctly, I could achieve the goal
(increasing LFS_MAX_BYTES, which is defined in terms of bufmem_lowater)
by increasing vm.bufmem_lowater to a value that would make LFS_MAX_BYTES
greater than or equal to the ifile length of 5431296 (from the message
above), and possibly increasing vm.bufmem_hiwater to 4880*hw.pagesize
.... all using sysctl, and avoiding needing to hardcode a value in my
kernel.

There are a number of other tests in sys/ufs/lfs/lfs_vfsops.c which
recommend changing BUFPAGES... should these be changed?  If they were
changed, should they recommend changing vm.bufmem_hiwater,
vm.bufmem_lowater, or both?

If I'm missing anything important here (which is certainly likely),
please let me know so I can learn.  :)

Thanks,
+j


--------------enig59201EC78E276964D78D2B20
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQCVAwUBQ3Z87rOuUtxCgar5AQM/IgP+N4ACOGYVKUhUKx1863MFwLLgVgNurvSi
vd6m3x/hoFIkWEkaX0ZPwGsEB1IYRq7nV/jzSA4f1fI4+RqIn+IHug7PK6rDxqZV
BVWASAr6+6bSIl9q2VGJstrRN4G+SFbHJ8H6AZ9noeIo696y5stBjo7WTAia6x8Y
RuKqC2J0F5E=
=mNgy
-----END PGP SIGNATURE-----

--------------enig59201EC78E276964D78D2B20--