From owner-freebsd-hackers Fri Jan 25 10:43:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 9D33B37B400 for ; Fri, 25 Jan 2002 10:43:09 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id A572310DDFB; Fri, 25 Jan 2002 10:43:08 -0800 (PST) Date: Fri, 25 Jan 2002 10:43:08 -0800 From: Alfred Perlstein To: Hyong-Youb Kim Cc: freebsd-hackers@FreeBSD.org Subject: Re: vm and vfs_bio Message-ID: <20020125104308.I13686@elvis.mu.org> 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 hykim@cs.rice.edu on Fri, Jan 25, 2002 at 04:07:26AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Hyong-Youb Kim [020125 02:08] wrote: > > >From what I have gathered from 4.4bsd book and 4.3 freebsd source code, > struct buf and various b* (read, write etc) functions implement the file > cache. I am wondering where the physical pages that struct buf has > references to reside in the vm map. It seems its virtual addresses are > allocated using buffer_map. Well my real question would be, does the vm > maintain a file cache independent of the file cache using struct buf? b->b_pages > And this is quite a different question but I will ask here. When a user > does a read (followed by open) on a file, the kernel must allocate vnode > corresponding to that file right? Assuming the file is not memory-mapped > by any other process, would the vnode still have a valid v_object field? If it is VMIO then yes. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message