From owner-freebsd-hackers Mon Aug 3 15:59:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA25370 for freebsd-hackers-outgoing; Mon, 3 Aug 1998 15:59:06 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA25365 for ; Mon, 3 Aug 1998 15:59:03 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id RAA16514; Mon, 3 Aug 1998 17:58:37 -0500 (EST) (envelope-from toor) Message-Id: <199808032258.RAA16514@dyson.iquest.net> Subject: Re: Relationship between buf/page/vnode/object? In-Reply-To: from Doug Rabson at "Aug 3, 98 10:52:38 am" To: dfr@nlsystems.com (Doug Rabson) Date: Mon, 3 Aug 1998 17:58:36 -0500 (EST) Cc: bf20761@binghamton.edu, freebsd-hackers@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Rabson said: > 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. > The buffers are both temporary mappings, and a low water mark on the amount of buffer space available. Note that the current implemenation of the VM/buffer cache code also limits the amount of dirty buffer space to the size of the buffer cache (actually less than that.) Almost all caching is done in the VM objects, and buffers (for file data) are mappings into the objects. -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message