Subject: CVS commit: src/sys/kern
To: None <source-changes@NetBSD.org>
From: Thor Lancelot Simon <tls@netbsd.org>
List: source-changes
Date: 01/10/2005 15:29:50
Module Name:	src
Committed By:	tls
Date:		Mon Jan 10 15:29:50 UTC 2005

Modified Files:
	src/sys/kern: vfs_bio.c

Log Message:
Users have observed that the amount of memory used by the metadata cache
can in some situations exceed the high-water mark, and stay there once it
gets there.  Adjust the canrelease function so that it will immediately
bring us back down to the high-water mark in this situation.

How can this happen at all?  Consider a machine with two filesystems, one
with a much larger blocksize than the other.  If the small-block filesystem
is very busy, growing the cache up to the high-water mark, and then the
large-block filesystem becomes busy, buffers will be recycled (since we
are at the high-water mark) but _grow each time they're recycled_.  Once
we're above the high-water mark, the canrelease call in allocbuf (without
this change) doesn't shrink us back down below it; so things get worse and
worse.


To generate a diff of this commit:
cvs rdiff -r1.140 -r1.141 src/sys/kern/vfs_bio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.