From owner-freebsd-current Mon May 20 10:37: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 4F48137B63E for ; Mon, 20 May 2002 10:35:28 -0700 (PDT) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.3/8.12.3) with ESMTP id g4KH4pHc069466 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Mon, 20 May 2002 19:04:56 +0200 (CEST) (envelope-from ticso@cicely5.cicely.de) Received: from cicely5.cicely.de (localhost [IPv6:::1]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g4KH4i95071264 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 20 May 2002 19:04:44 +0200 (CEST)?g (envelope-from ticso@cicely5.cicely.de) Received: (from ticso@localhost) by cicely5.cicely.de (8.12.1/8.12.1/Submit) id g4KH4hJq071263 for freebsd-current@FreeBSD.ORG; Mon, 20 May 2002 19:04:43 +0200 (CEST)?g (envelope-from ticso) Date: Mon, 20 May 2002 19:04:43 +0200 From: Bernd Walter To: freebsd-current@FreeBSD.ORG Subject: nbuf calculation broken (was: deadlock waiting for newbuf) Message-ID: <20020520170443.GA70468@cicely5.cicely.de> References: <20020520133725.GB68981@cicely5.cicely.de> <20020520143935.GE68981@cicely5.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020520143935.GE68981@cicely5.cicely.de> User-Agent: Mutt/1.3.26i X-Operating-System: FreeBSD cicely5.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG nbuf on that 256M machine is only 50. All other values depend on it. If have neither configure NBUF in my kernconfig nor do I have set kern.nbuf in loader(8). In sys/kern/vfs_bio.c kern_vfs_bio_buffer_alloc() we have: if (nbuf == 0) { int factor = 4 * BKVASIZE / 1024; nbuf = 50; if (physmem_est > 4096) nbuf += min((physmem_est - 4096) / factor, 65536 / factor); if (physmem_est > 65536) nbuf += (physmem_est - 65536) * 2 / (factor * 5); if (maxbcache && nbuf > maxbcache / BKVASIZE) nbuf = maxbcache / BKVASIZE; } BKVASIZE should be OK. That means physmem_est must be < 4096 when kern_vfs_bio_buffer_alloc() is called. This points to vm_ksubmap_init() or below. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message