From owner-freebsd-arch@FreeBSD.ORG Mon Aug 4 11:49:51 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C9CE37B401 for ; Mon, 4 Aug 2003 11:49:51 -0700 (PDT) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 583B743F75 for ; Mon, 4 Aug 2003 11:49:50 -0700 (PDT) (envelope-from jkim@niksun.com) Received: from daemon.mj.niksun.com (daemon.mj.niksun.com [10.70.0.244]) by anuket.mj.niksun.com (8.12.6p2/8.12.3) with ESMTP id h74In1lT022980 for ; Mon, 4 Aug 2003 14:49:01 -0400 (EDT) (envelope-from jkim@niksun.com) X-RAV-AntiVirus: This e-mail has been scanned for viruses. From: Jung-uk Kim Organization: Niksun, Inc. To: freebsd-arch@freebsd.org Date: Mon, 4 Aug 2003 14:48:54 -0400 User-Agent: KMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308041448.54790.jkim@niksun.com> Subject: Confusing BKVASIZE X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2003 18:49:51 -0000 As you know, BKVASIZE is 16K: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/param.h#rev1.63 Default UFS block size is also 16K: http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/newfs/newfs.c#rev1.46 But src/sys/sys/param.h says: 'The default (BKVASIZE) is 16384, roughly 2x the block size used by a normal UFS filesystem.' This is not true any more and it is really confusing. In fact, I found many confusing instances, e.g. src/sys/kern/vfs_bio.c: /* * To support extreme low-memory systems, make sure hidirtybuffers cannot * eat up all available buffer space. This occurs when our minimum cannot * be met. We try to size hidirtybuffers to 3/4 our buffer space assuming * BKVASIZE'd (8K) buffers. */ I cannot believe comments any more and this is clearly error-prone. :-( Can anybody clean this mess up? Thanks, Jung-uk Kim