From owner-freebsd-hackers Mon Aug 3 02:50:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA28521 for freebsd-hackers-outgoing; Mon, 3 Aug 1998 02:50:25 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA28515 for ; Mon, 3 Aug 1998 02:50:23 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.8/8.8.5) with SMTP id JAA07188; Mon, 3 Aug 1998 09:52:38 GMT Date: Mon, 3 Aug 1998 10:52:38 +0100 (BST) From: Doug Rabson To: zhihuizhang cc: hackers Subject: Re: Relationship between buf/page/vnode/object? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 2 Aug 1998, zhihuizhang wrote: > > After studying VM source code for two months, I have understood the > general ideas in it. All the pages (vm_page structures) belong to a > object/pindex pair and virtual memory/physical memory is decoupled by > introducing the VM object. > > What confuses me now is that vnode and buf structures can also have pages > (vm_page structures) associated with them. But file system cache and VM > cache are unified and should have a consistent interface. I mean all pages > should only hang off the vm_object structures. > > I hope that someone can describe the relationship of these important > structures (vm_object, vm_page, vnode, buf) briefly for me. I have > searched the MailingList Archive in vain. > > Any help is appreciated. As far as I know, the pages which are held in buf structures are 'owned' by a unique vm_object. This object holds cached pages for a vnode and has an associated vnode_pager. The buf just provides a convenient way of performing 'regular' i/o into the same pages as those used for VM. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message