NetBSD Problem Report #8954
Received: (qmail 11183 invoked from network); 5 Dec 1999 14:58:04 -0000
Message-Id: <199912051457.XAA26967@yayoi.hiru.aoba.yokohama.jp>
Date: Sun, 5 Dec 1999 23:57:32 +0900 (JST)
From: ura@hiru.aoba.yokohama.jp
Reply-To: ura@hiru.aoba.yokohama.jp
To: gnats-bugs@gnats.netbsd.org
Subject: buffer cache is too little when BUFCACHE is defined.
X-Send-Pr-Version: 3.95
>Number: 8954
>Category: kern
>Synopsis: buffer cache is too little when BUFCACHE is defined.
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 05 07:00:01 +0000 1999
>Closed-Date: Sun Dec 05 15:53:42 +0000 1999
>Last-Modified: Sun Dec 17 13:28:26 +0000 2000
>Originator: URA Hiroshi
>Release: NetBSD-current (1999/12/05)
>Organization:
>Environment:
System: NetBSD satsuki.hiru.aoba.yokohama.jp 1.4P NetBSD 1.4P (SATSUKI) #5: Sun Dec 5 06:18:00 JST 1999 ura@satsuki.hiru.aoba.yokohama.jp:/usr/local/src/NetBSD/current/src/sys/arch/i386/compile/SATSUKI i386
>Description:
I found that buffer cache is too little.
NetBSD 1.4P (SATSUKI) #4: Sun Dec 5 06:18:00 JST 1999
ura@satsuki:/usr/local/src/NetBSD/current/src/sys/arch/i386/compile/SATSUKI
cpu0: family 6 model 6 step 5
cpu0: Intel Pentium II (Celeron) (686-class)
total memory = 127 MB
avail memory = 122 MB
using 21 buffers containing 86016 of memory
BIOS32 rev. 0 found at 0xfb450
mainbus0 (root)
<snip.>
I define BUFCACHE option to my kernel config file.
>How-To-Repeat:
1. add your kernel configuration file to `options BUFCACHE 20'
2. recompile kernel
3. reboot machine using new kernel
4. see dmesg
>Fix:
Apply this patch.
Index: kern_allocsys.c
===================================================================
RCS file: /cvsroot/netbsd/syssrc/sys/kern/kern_allocsys.c,v
retrieving revision 1.6
diff -u -u -r1.6 kern_allocsys.c
--- kern_allocsys.c 1999/12/03 21:43:19 1.6
+++ kern_allocsys.c 1999/12/05 10:00:11
@@ -165,7 +165,7 @@
if (bufcache < 5 || bufcache > 95)
panic("bufcache is out of range (%d)\n",
bufcache);
- bufpages = physmem / bufcache / 100;
+ bufpages = physmem * bufcache / 100;
} else {
if (physmem < btoc(2 * 1024 * 1024))
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: tron
State-Changed-When: Sun Dec 5 07:53:42 PST 1999
State-Changed-Why:
Patch committed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.