Subject: Re: using X buffers containing Y KB of memeory -- broken?
To: None <port-sparc@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-sparc
Date: 10/29/1999 02:19:49
In <199910281708.TAA08729@sean.ebone.net>
smd@ebone.net wrote:

>    Please examine the "using X buffers..." lines below.   Sources
> are -current, as of yesterday.
 :
>    Note that we do not see 20% of the memory allocated to buffers in
> the second paste above, and while we do see 2048 pages of buffer cache
> in the first one, we do not have an accurate count of memory (it's not 512KB).

bufpages are clipped in sparc/machdep.c:mdallocsys() on SUN4C:

---
caddr_t
mdallocsys(v)
	caddr_t v;
{

	/* Clip bufpages if necessary. */
	if (CPU_ISSUN4C && bufpages > (128 * (65536/MAXBSIZE)))
		bufpages = (128 * (65536/MAXBSIZE));

	return (v);
}
---

machdep.c of 1.4-release (before MI allocsys() changes) says:

---
		/*
		 * XXX stopgap measure to prevent wasting too much KVM on
		 * the sparsely filled buffer cache.
		 */
		if (CPU_ISSUN4C && bufpages > (128 * (65536/MAXBSIZE)))
			bufpages = (128 * (65536/MAXBSIZE));
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp