From owner-freebsd-hackers Wed Apr 18 11:58:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 5CD2B37B422 for ; Wed, 18 Apr 2001 11:58:22 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3IIwKG01465; Wed, 18 Apr 2001 11:58:20 -0700 (PDT) Date: Wed, 18 Apr 2001 11:58:20 -0700 From: Alfred Perlstein To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Buffer emergence reserve Message-ID: <20010418115820.R976@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zzhang@cs.binghamton.edu on Wed, Apr 18, 2001 at 12:18:22PM -0400 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Zhihui Zhang [010418 09:18] wrote: > > While looking at the code in vfs_bio.c, I notice the existence of low and > high free buffer counters. The comments say they are there to give some > special process like buf daemon access to emergence reserve. I just > don't get the reason for having this emergence reserve. Do we allocate > buffer in an interrupt environment? Do we need extra buffers in order to > free buffers? Please shed a light on this for me. Thanks. It's really a simple issue of: "sometimes to clean a buffer we need one or more buffers" Think of some random data block at the far end of a large file. If the indirect blocks aren't in memory you will need to bring them in to lookup the location of the buffer you're writing because buffers use logical offsets rather than physical ones. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] Represent yourself, show up at BABUG http://www.babug.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message