Subject: Re: CVS commit: src/sys/sys
To: None <christos@zoulas.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: source-changes
Date: 06/07/2005 00:31:04
christos@zoulas.com wrote:

> | Hmm, bufpages is actually used by some files:
> | sys/arch/powerpc/oea/oea_machdep.c
Sorry, this doesn't refer it (only in comments).

> | sys/arch/sun2/sun2/machdep.c
> | sys/compat/irix/irix_sysmp.c (local declaration added already)
> | 
> | Shouldn't they refer it?
> 
> It is always 0 these days. If they actually need the count, they should
> use the new uvm variable.

But accroding to sys/kern/vfs_bio.c, we could still override it
for bufmem_hiwater, coundn't it?
(though sun2 value (37) seems overrided again by BUFMEM_HIWMMIN)
---
 :

#ifndef	BUFPAGES
# define BUFPAGES 0
#endif

 :

u_int	bufpages = BUFPAGES;	/* optional hardwired count */

 :

u_long
buf_memcalc(void)
{
	u_long n;

	/*
	 * Determine the upper bound of memory to use for buffers.
	 *
	 *	- If bufpages is specified, use that as the number
	 *	  pages.
	 *
	 *	- Otherwise, use bufcache as the percentage of
	 *	  physical memory.
	 */
	if (bufpages != 0) {
		n = bufpages;
	} else {
		if (bufcache < 5) {

 :
---
Izumi Tsutsui